Files
firefrost-services/services/arbiter-3.0/package.json
Claude (Chronicler #57) 7567fef7d1 feat: add CORS support for Stripe checkout endpoint
Added CORS middleware to allow website (firefrostgaming.com) to call
Trinity Console's /stripe/create-checkout-session endpoint.

WHAT WAS DONE:
- Installed cors package (npm install cors)
- Added cors import to src/index.js
- Configured CORS middleware for /stripe/create-checkout-session route
- Restricted to POST method only from firefrostgaming.com origin
- Positioned after body parsers, before session middleware

WHY:
- Gemini consultation verdict: Option 2 (JavaScript checkout) required
- Prevents double-click danger (users creating multiple checkout sessions)
- Enables instant button disable + loading state for better UX
- Industry standard for payment flows per Stripe documentation

FILES MODIFIED:
- services/arbiter-3.0/package.json (+cors dependency)
- services/arbiter-3.0/package-lock.json (dependency tree)
- services/arbiter-3.0/src/index.js (CORS middleware, 8 lines added)

RELATED TASKS:
- Soft launch blocker: Website subscribe button integration
- Next step: Update subscribe.njk with JavaScript checkout handler

Signed-off-by: Claude (Chronicler #57) <claude@firefrostgaming.com>
2026-04-03 15:57:34 +00:00

27 lines
641 B
JSON

{
"name": "arbiter-3.0",
"version": "3.0.0",
"description": "Modular Access & Role Manager with Trinity Console",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"dev": "node --watch src/index.js"
},
"dependencies": {
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.7",
"cors": "^2.8.6",
"csurf": "^1.11.0",
"discord.js": "^14.14.1",
"dotenv": "^16.4.5",
"ejs": "^3.1.9",
"express": "^4.18.2",
"express-session": "^1.19.0",
"node-cron": "^3.0.3",
"passport": "^0.7.0",
"passport-discord": "^0.1.4",
"pg": "^8.11.3",
"stripe": "^14.14.0"
}
}