Skip to content

fix: guard express fallback from missing cors#84

Closed
csecrestjr wants to merge 3 commits into
codex/fix-comment-in-backend/server.js-kwwfmufrom
codex/fix-comment-in-backend/server.js-tofezi
Closed

fix: guard express fallback from missing cors#84
csecrestjr wants to merge 3 commits into
codex/fix-comment-in-backend/server.js-kwwfmufrom
codex/fix-comment-in-backend/server.js-tofezi

Conversation

@csecrestjr

Copy link
Copy Markdown
Collaborator

Summary

  • ensure Express only starts when both express and cors load so fallback server activates if either import fails

Testing

  • ./scripts/list-hardcoded-urls.sh
  • cd backend && timeout 10 npm install --omit=dev --no-progress
  • cd backend && npm test
  • cd backend && timeout 5 node server.js

https://chatgpt.com/codex/tasks/task_e_68b5109a33e48321bd6da9448a6755c2

@csecrestjr

Copy link
Copy Markdown
Collaborator Author

@codex Fix these checks

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Verified the backend server only starts when both express and cors are available, falling back to a basic HTTP server otherwisebackend/server.jsL1-L21

Testing

  • ./scripts/list-hardcoded-urls.sh (no output)
  • cd backend && timeout 10 npm install --omit=dev --no-progress
  • cd backend && npm test
  • cd backend && timeout 5 node server.js

View task →

@csecrestjr

Copy link
Copy Markdown
Collaborator Author

@codex Fix these checks

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Parameterized the CORS development origin via environment variables, avoiding hardcoded localhost entries and keeping the server’s allowed origins configurablebackend/server.jsL32-L43
  • Refactored the Vite development proxy to derive its backend target from env vars, eliminating hardcoded localhost URLs in the frontend configfrontend/chat-ui/vite.config.jsL1-L24

Testing

  • ./scripts/list-hardcoded-urls.sh
  • cd backend && timeout 10 npm install --omit=dev --no-progress
  • cd backend && npm test
  • cd backend && timeout 5 node server.js

View task →

…y9ooy0

fix: guard express fallback from missing cors
@csecrestjr csecrestjr closed this Sep 1, 2025
@csecrestjr
csecrestjr deleted the codex/fix-comment-in-backend/server.js-tofezi branch November 11, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant