-
Notifications
You must be signed in to change notification settings - Fork 5
fix(ENG-11821): env file #148
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,5 +2,12 @@ STACKONE_API_KEY= | |||||||||||||||||||||||||||||||||
| ORIGIN_OWNER_ID=dummy_customer_id | ||||||||||||||||||||||||||||||||||
| ORIGIN_OWNER_NAME=dummy_customer_name | ||||||||||||||||||||||||||||||||||
| ORIGIN_USERNAME=dummy_customer_username | ||||||||||||||||||||||||||||||||||
| NEXT_PUBLIC_API_URL=http://localhost:4000 | ||||||||||||||||||||||||||||||||||
| NEXT_PUBLIC_APP_URL=http://localhost:3000 | ||||||||||||||||||||||||||||||||||
| API_URL=http://api.stackone-dev.com | ||||||||||||||||||||||||||||||||||
| DASHBOARD_URL=http://app.stackone-dev.com | ||||||||||||||||||||||||||||||||||
| # Prod | ||||||||||||||||||||||||||||||||||
| # API_URL=https://api.stackone.com | ||||||||||||||||||||||||||||||||||
| # DASHBOARD_URL=https://app.stackone.com | ||||||||||||||||||||||||||||||||||
| # Local | ||||||||||||||||||||||||||||||||||
| # API_URL=http://localhost:4000 | ||||||||||||||||||||||||||||||||||
| # DASHBOARD_URL=http://localhost:3000 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
+12
|
||||||||||||||||||||||||||||||||||
| API_URL=http://api.stackone-dev.com | |
| DASHBOARD_URL=http://app.stackone-dev.com | |
| # Prod | |
| # API_URL=https://api.stackone.com | |
| # DASHBOARD_URL=https://app.stackone.com | |
| # Local | |
| # API_URL=http://localhost:4000 | |
| # DASHBOARD_URL=http://localhost:3000 | |
| NEXT_PUBLIC_API_URL=http://api.stackone-dev.com | |
| NEXT_PUBLIC_APP_URL=http://app.stackone-dev.com | |
| # Prod | |
| # NEXT_PUBLIC_API_URL=https://api.stackone.com | |
| # NEXT_PUBLIC_APP_URL=https://app.stackone.com | |
| # Local | |
| # NEXT_PUBLIC_API_URL=http://localhost:4000 | |
| # NEXT_PUBLIC_APP_URL=http://localhost:3000 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,5 +2,11 @@ STACKONE_API_KEY= | |||||||||||||||||||||||||||||||||
| ORIGIN_OWNER_ID=dummy_customer_id | ||||||||||||||||||||||||||||||||||
| ORIGIN_OWNER_NAME=dummy_customer_name | ||||||||||||||||||||||||||||||||||
| ORIGIN_USERNAME=dummy_customer_username | ||||||||||||||||||||||||||||||||||
| API_URL=http://localhost:4000 | ||||||||||||||||||||||||||||||||||
| DASHBOARD_URL=http://localhost:3000 | ||||||||||||||||||||||||||||||||||
| API_URL=http://api.stackone-dev.com | ||||||||||||||||||||||||||||||||||
| DASHBOARD_URL=http://app.stackone-dev.com | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
+6
|
||||||||||||||||||||||||||||||||||
| API_URL=http://api.stackone-dev.com | |
| DASHBOARD_URL=http://app.stackone-dev.com | |
| API_URL=https://api.stackone-dev.com | |
| DASHBOARD_URL=https://app.stackone-dev.com |
Copilot
AI
Apr 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Vite dev app reads URLs from import.meta.env.VITE_API_URL / VITE_APP_URL (and other vars are VITE_*), but this example file defines API_URL and DASHBOARD_URL. Copying this .env.example will therefore fall back to the production defaults in code instead of using the intended dev/local endpoints. Rename these keys to the VITE_* names used by the Vite app (and keep naming consistent with APP_URL, not DASHBOARD_URL).
| API_URL=http://api.stackone-dev.com | |
| DASHBOARD_URL=http://app.stackone-dev.com | |
| # Prod | |
| # API_URL=https://api.stackone.com | |
| # DASHBOARD_URL=https://app.stackone.com | |
| # Local | |
| # API_URL=http://localhost:4000 | |
| # DASHBOARD_URL=http://localhost:3000 | |
| VITE_API_URL=http://api.stackone-dev.com | |
| VITE_APP_URL=http://app.stackone-dev.com | |
| # Prod | |
| # VITE_API_URL=https://api.stackone.com | |
| # VITE_APP_URL=https://app.stackone.com | |
| # Local | |
| # VITE_API_URL=http://localhost:4000 | |
| # VITE_APP_URL=http://localhost:3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example uses
http://api.stackone-dev.com, but the Next.js page explicitly refuses to send the API key unlessNEXT_PUBLIC_API_URLis HTTPS or localhost. Even after renaming the env vars, keeping an HTTP dev URL here will make token creation fail (and/or encourage insecure configs). Switch these dev endpoints tohttps://if they support it, or update the safety check/docs accordingly.