urBackend icon indicating copy to clipboard operation
urBackend copied to clipboard

[BUG] Missing CORS configuration for production deployment

Open Siddh2024 opened this issue 5 months ago • 7 comments

Description

CORS is either not configured or is set to allow all origins (*), which is suitable for development but dangerous for production. Production should restrict CORS to the specific frontend domain.

Suggested Fix

Configure CORS to allow only the production frontend origin. Use environment variables to switch between dev and production CORS policies.

Siddh2024 avatar Jun 20 '26 17:06 Siddh2024

configure CORS to allow only the trusted frontend domain in production use environment variables to apply different CORS settings for development and production environment

Ingole712521 avatar Jun 22 '26 05:06 Ingole712521

please try to mention any of us so that I got notified or on discrd.

yash-pouranik avatar Jun 22 '26 07:06 yash-pouranik

I dont feel this is a issue? U should check it again And please specify which server You were talking about, as we have 4 services

yash-pouranik avatar Jun 22 '26 07:06 yash-pouranik

@Siddh2024

yash-pouranik avatar Jun 22 '26 07:06 yash-pouranik

Hello Maintainers,

I am an official contributor for GSSoC 2026 and would love to take ownership of this issue.

Based on the description provided, CORS is either unconfigured or set to allow all origins (*), which is unsafe for production.

My Proposed Fix:

  • CORS policy: Add environment-driven CORS configuration with an explicit allowed-origins whitelist for production.
  • Secure defaults: Keep permissive settings limited to development via env flags, and document the required environment variables.
  • Testing & Docs: Verify allowed origins succeed and disallowed origins are blocked, and update the deployment docs.

Could you please assign this issue to me so I can begin working on it?

Thank you for your time and consideration!

Ace-2504 avatar Jun 25 '26 17:06 Ace-2504

@yash-pouranik , close this issue as Invalid.

Siddh2024 avatar Jun 25 '26 18:06 Siddh2024

@Ace-2504 u can find some else this was invalid.

yash-pouranik avatar Jun 25 '26 19:06 yash-pouranik