Skip to content

fix : removed hardcoded Render URL from CORS allowedOrigins - #2027

Open
tmdeveloper007 wants to merge 4 commits into
aryandas2911:mainfrom
tmdeveloper007:#2022
Open

fix : removed hardcoded Render URL from CORS allowedOrigins#2027
tmdeveloper007 wants to merge 4 commits into
aryandas2911:mainfrom
tmdeveloper007:#2022

Conversation

@tmdeveloper007

Copy link
Copy Markdown

Summary of What Has Been Done

The server.js file contained a hardcoded Render deployment URL in the CORS allowedOrigins array. This has been removed since the CORS configuration already reads from environment variables CORS_ORIGIN, CLIENT_ORIGIN, and FRONTEND_URL.

Changes Made

  1. backend/src/server.js:
    • Removed the hardcoded string "https://dailyforge-frontend-lhjq.onrender.com" from the allowedOrigins array

Impact it Made

  • CORS configuration now relies solely on environment variables
  • No hardcoded production URLs in the codebase
  • Cleaner and more environment-driven deployment configuration

Closes #2022

Note: Please assign this PR to the tmdeveloper007 account.

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.

fix : remove hardcoded Render URL from CORS allowedOrigins

1 participant