Skip to content

Update CORS Headers#963

Merged
mbryzek merged 1 commit intomainfrom
cors
Mar 2, 2026
Merged

Update CORS Headers#963
mbryzek merged 1 commit intomainfrom
cors

Conversation

@mbryzek
Copy link
Collaborator

@mbryzek mbryzek commented Mar 2, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 2, 2026 23:30
@mbryzek mbryzek merged commit 40affc8 into main Mar 2, 2026
2 of 4 checks passed
@mbryzek mbryzek deleted the cors branch March 2, 2026 23:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Play CORS configuration to explicitly define permitted origins for browser requests.

Changes:

  • Adds play.filters.cors.allowedOrigins entries for apibuilder app domains and a local dev origin.
  • (Accidentally) duplicates the play.filters.cors.allowedHttpMethods setting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


play.filters.cors.preflightMaxAge = 3 days
play.filters.cors.allowedHttpMethods = ["DELETE", "GET", "PATCH", "POST", "PUT", "OPTIONS"]
play.filters.cors.allowedHttpMethods = ["DELETE", "GET", "PATCH", "POST", "PUT", "OPTIONS"]
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

play.filters.cors.allowedHttpMethods is defined twice with the same value. In HOCON the last assignment wins, but this duplication is confusing and can hide future changes—please remove the duplicate line and keep a single definition.

Suggested change
play.filters.cors.allowedHttpMethods = ["DELETE", "GET", "PATCH", "POST", "PUT", "OPTIONS"]

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +21
"https://app.apibuilder.org",
"http://localhost:5173"
]


Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base.conf is included by both production and dev/test configs, so allowing http://localhost:5173 here will also allow localhost origins in production. If localhost is only for local development, move it to devandtest.conf (or another non-production override) and keep base.conf production-safe.

Suggested change
"https://app.apibuilder.org",
"http://localhost:5173"
]
"https://app.apibuilder.org"
]

Copilot uses AI. Check for mistakes.
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