Replace hardcoded production URLs with environment variables#281
Draft
Replace hardcoded production URLs with environment variables#281
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove PROD_URL from shared folder and use environment variables
Replace hardcoded PROD_URL with NEXT_PUBLIC_PROD_URL environment variable
Feb 7, 2026
Collaborator
|
@copilot , please hide the aedes.calgarysolar.ca:3001 environment variable. this is a secret we should not be exposing. |
Collaborator
|
@copilot please fix the merge conflicts |
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Author
Done. Removed all references to |
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Copilot
AI
changed the title
Replace hardcoded PROD_URL with NEXT_PUBLIC_PROD_URL environment variable
Replace hardcoded production URLs with environment variables
Feb 7, 2026
Co-authored-by: justin-phxm <113923596+justin-phxm@users.noreply.github.com>
Author
Collaborator
|
requires updating the environment variables in aws secrets. not going to do for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.