Skip to content

[billing] #3 Pre-parser route hook (core) #3242

Description

@PierreBrisorgueil

Context

Stripe webhooks need raw body for signature verification. The global express.json() and lusca() CSRF must be bypassed for webhook routes.

Scope

  • lib/services/express.js: add initPreParserRoutes(app) called before express.json() and lusca()
  • New glob in config/assets.js: modules/*/routes/*.preroute.js
  • Pre-parser routes are mounted without body parser or CSRF

Acceptance criteria

  • A .preroute.js route receives raw body (Buffer)
  • Normal routes still get parsed JSON
  • CSRF still applies to normal routes
  • No regression on existing modules

Dependencies

None (independent core change)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatA new featurebillingPhase 3 — Stripe billing integration

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions