Skip to content

Conversation

@field123
Copy link
Collaborator

@field123 field123 commented Jan 30, 2026

Summary

  • Replace allowedHeaders: "*" with explicit header list (wildcards don't work with credentials: true)
  • Add cmCors middleware to /api/v1/settings/apitokens endpoints
  • Add cmCors middleware to /api/v1/hosts endpoints
  • Add preflight handlers for new endpoints

Problem

CORS requests with credentials were failing because:

  1. Access-Control-Allow-Headers: * is treated literally (not as wildcard) when credentials mode is 'include'
  2. Missing CORS middleware on apitokens and hosts endpoints

- Replace allowedHeaders: "*" with explicit list
  (wildcards don't work with credentials: true)
- Add cmCors to /api/v1/settings/apitokens endpoints
- Add cmCors to /api/v1/hosts endpoints
- Add preflight handlers for new endpoints
@field123 field123 merged commit f2a82cc into master Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants