-
Notifications
You must be signed in to change notification settings - Fork 0
Replace hardcoded production URLs with environment variables #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: justin-phxm <[email protected]>
Co-authored-by: justin-phxm <[email protected]>
Co-authored-by: justin-phxm <[email protected]>
|
@copilot , please hide the aedes.calgarysolar.ca:3001 environment variable. this is a secret we should not be exposing. |
|
@copilot please fix the merge conflicts |
Co-authored-by: justin-phxm <[email protected]>
Done. Removed all references to |
Co-authored-by: justin-phxm <[email protected]>
Co-authored-by: justin-phxm <[email protected]>
|
requires updating the environment variables in aws secrets. not going to do for now. |
Hardcoded production URLs in
packages/shared/src/prodFlag.tsprevented deployment flexibility, violated config management best practices, and exposed sensitive infrastructure details.Changes
packages/shared/src/prodFlag.ts: BothprodURLandsocketURLnow read from environment variables (NEXT_PUBLIC_PROD_URLandNEXT_PUBLIC_SOCKET_URL) with fallback to localhost for development. Removed all hardcoded production URLs for security.packages/client/.env.example: Added bothNEXT_PUBLIC_PROD_URLandNEXT_PUBLIC_SOCKET_URLwith generic placeholder examples (no sensitive URLs exposed). Also retainedSOCKET_URLfrom main branch for backward compatibility.README.md: Documented both new environment variables in setup instructionsImplementation
Security
All hardcoded production URLs have been removed from the codebase. Production deployments now require explicit environment variable configuration, preventing accidental exposure of infrastructure details.
Merge Conflict Resolution
Resolved merge conflict with main branch by preserving
SOCKET_URL=localhost:3001alongside the newNEXT_PUBLIC_SOCKET_URLenvironment variable for backward compatibility with existing configurations.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.