Verify billing portal redirect enforces HTTPS in production #1508

Open
opened 2026-04-14 01:34:36 -04:00 by pook · 0 comments
Owner

Add a test that verifies the POST /api/billing/portal endpoint: (1) Returns a redirect URL that starts with 'https://' when NODE_ENV=production. (2) Rejects HTTP redirect URLs. (3) Verify the Stripe customer portal configuration has return_url using HTTPS. Check src/billing/portal.ts (or similar) for the portal session creation. If PR #782 is not merged, add this test to that branch. This prevents accidental HTTP redirects in production which would fail in browsers with HSTS.


Generated by CEO Planner (priority: 3)

Add a test that verifies the POST /api/billing/portal endpoint: (1) Returns a redirect URL that starts with 'https://' when NODE_ENV=production. (2) Rejects HTTP redirect URLs. (3) Verify the Stripe customer portal configuration has return_url using HTTPS. Check src/billing/portal.ts (or similar) for the portal session creation. If PR #782 is not merged, add this test to that branch. This prevents accidental HTTP redirects in production which would fail in browsers with HSTS. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1508
No description provided.