fix: move webhook to /webhooks/stripe to avoid route conflict
ISSUE: Mounting at /stripe/webhook conflicts with /stripe mount Both mounts match the webhook URL, JSON parser wins FIX: Changed webhook mount from /stripe/webhook to /webhooks/stripe Now completely separate from /stripe checkout mount NEW WEBHOOK URL: https://discord-bot.firefrostgaming.com/webhooks/stripe/webhook UPDATE STRIPE DASHBOARD TO: https://discord-bot.firefrostgaming.com/webhooks/stripe/webhook Signed-off-by: Claude (Chronicler #57) <claude@firefrostgaming.com>
This commit is contained in:
@@ -39,10 +39,10 @@ app.set('view engine', 'ejs');
|
||||
app.set('views', __dirname + '/views');
|
||||
|
||||
// CRITICAL: Stripe webhook needs raw body BEFORE express.json() middleware
|
||||
// This route must be registered before any body parsers
|
||||
app.use('/stripe/webhook', stripeRoutes);
|
||||
// Mounted at /webhooks/stripe to avoid conflict with /stripe checkout mount
|
||||
app.use('/webhooks/stripe', stripeRoutes);
|
||||
|
||||
// Body parsing middleware (comes AFTER stripe webhook route)
|
||||
// Body parsing middleware (comes AFTER webhook route)
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user