Skip to content

fix: Modify CORS_ALLOWED_ORIGINS to accept string values#205

Merged
akshat5302 merged 4 commits intomasterfrom
fix/pi-config-map-cors
Mar 5, 2026
Merged

fix: Modify CORS_ALLOWED_ORIGINS to accept string values#205
akshat5302 merged 4 commits intomasterfrom
fix/pi-config-map-cors

Conversation

@mguptahub
Copy link
Collaborator

@mguptahub mguptahub commented Mar 5, 2026

Description

This pull request updates how the CORS_ALLOWED_ORIGINS environment variable is set in the pi-api-env.yaml Helm template. The main change is to ensure that the allowed origins are always formatted as a comma-separated string, and to include both the license domain and any additional origins specified in the configuration.

Configuration changes for CORS:

  • Updated the logic for setting CORS_ALLOWED_ORIGINS so that it is always a comma-separated string, and includes both the license domain (with http and https) and any extra origins provided in .Values.env.pi_envs.cors_allowed_origins. This improves compatibility with services expecting a string rather than an array.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

User reported issue: #204

Summary by CodeRabbit

  • Bug Fixes

    • Improved CORS configuration handling to better support multiple origin scenarios and domain-based settings.
  • Chores

    • Updated chart version to 2.2.1.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f3d24f4f-3e20-429b-b24f-49fc28b79c5d

📥 Commits

Reviewing files that changed from the base of the PR and between bb32e08 and 3fdf3ec.

📒 Files selected for processing (2)
  • charts/plane-enterprise/Chart.yaml
  • charts/plane-enterprise/templates/config-secrets/pi-api-env.yaml

Walkthrough

Two changes to the plane-enterprise Helm chart: a version bump from 2.2.0 to 2.2.1 in Chart.yaml, and a refactor of CORS_ALLOWED_ORIGINS logic in pi-api-env.yaml ConfigMap template to conditionally handle wildcard values, custom origins, and license domain incorporation.

Changes

Cohort / File(s) Summary
Version Update
charts/plane-enterprise/Chart.yaml
Bumped chart version from 2.2.0 to 2.2.1; appVersion unchanged.
CORS Configuration Logic
charts/plane-enterprise/templates/config-secrets/pi-api-env.yaml
Refactored CORS_ALLOWED_ORIGINS to use conditional branching: wildcard "*" passthrough, custom origins with license domain injection, and fallback default with license domain only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops of joy for version's climb,
CORS now speaks with perfect rhyme,
Domains dance in harmony,
Security blooms wild and free! 🌿

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/pi-config-map-cors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

akshat5302 and others added 2 commits March 5, 2026 11:56
@akshat5302 akshat5302 marked this pull request as ready for review March 5, 2026 07:00
…ecting the latest application version of Plane to 2.4.0.
@akshat5302 akshat5302 merged commit c4eed27 into master Mar 5, 2026
2 checks passed
@akshat5302 akshat5302 deleted the fix/pi-config-map-cors branch March 5, 2026 07:02
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.

3 participants