Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions dev/nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +5 to +6

Copilot AI Apr 29, 2026

Copy link

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 unless NEXT_PUBLIC_API_URL is 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 to https:// if they support it, or update the safety check/docs accordingly.

Suggested change
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 uses AI. Check for mistakes.
# 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

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Next.js sandbox reads process.env.NEXT_PUBLIC_API_URL and NEXT_PUBLIC_APP_URL, but this example file now defines API_URL and DASHBOARD_URL. Copying this .env.example won’t configure the app and will cause it to fall back to the production defaults (https://api.stackone.com / https://app.stackone.com). Update the variable names to match what Next.js code expects (including the NEXT_PUBLIC_ prefix).

Suggested change
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

Copilot uses AI. Check for mistakes.

10 changes: 8 additions & 2 deletions dev/vite/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These URLs are set to http://… even though the dev app sends the API key as an Authorization header when creating sessions. Using HTTP here would transmit credentials in plaintext; prefer https:// for non-local endpoints (or explicitly document why HTTP is required).

Suggested change
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 uses AI. Check for mistakes.
# 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

Copilot AI Apr 29, 2026

Copy link

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).

Suggested change
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

Copilot uses AI. Check for mistakes.
Loading