Skip to content

fix(deploy): use JSON list format for CORS origins in stage#448

Merged
jsell-rh merged 1 commit intomainfrom
jsell/fix/cors-origins-format
Apr 23, 2026
Merged

fix(deploy): use JSON list format for CORS origins in stage#448
jsell-rh merged 1 commit intomainfrom
jsell/fix/cors-origins-format

Conversation

@jsell-rh
Copy link
Copy Markdown
Collaborator

@jsell-rh jsell-rh commented Apr 23, 2026

Summary

KARTOGRAPH_CORS_ORIGINS is a list[str] field in pydantic-settings, which requires JSON list format. The comma-separated string was failing to parse, so CORS middleware never initialized — causing 405 on OPTIONS preflight requests.

Verified locally: comma-separated → parse error, JSON list → works.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CORS origin configuration in the staging environment with format changes.

Pydantic-settings requires JSON list format for list[str] fields.
Comma-separated strings fail to parse, causing CORS middleware to
not initialize and OPTIONS preflight requests to return 405.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 3c122d8f-68ce-4232-8a3c-dbcff709ffb0

📥 Commits

Reviewing files that changed from the base of the PR and between fc053f2 and 97e5df4.

📒 Files selected for processing (1)
  • deploy/apps/kartograph/overlays/stage/configmap-patch.yaml

Walkthrough

A Kubernetes ConfigMap resource in the staging environment overlay is updated to modify the CORS origins configuration for the Kartograph service. The KARTOGRAPH_CORS_ORIGINS field changes from a comma-separated list of two origins to a JSON array format containing a single origin. This removes https://kartograph-stage.devshift.net from the allowed CORS origins while maintaining the remaining origin in a different string format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: converting CORS origins format from comma-separated to JSON list format in the stage environment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jsell/fix/cors-origins-format

Comment @coderabbitai help to get the list of available commands and usage tips.

@jsell-rh jsell-rh merged commit 31d6b68 into main Apr 23, 2026
9 of 10 checks passed
@jsell-rh jsell-rh deleted the jsell/fix/cors-origins-format branch April 23, 2026 20:31
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.

1 participant