Skip to content

API-56 Fixed allowed domains, allow localhost to run for explorer whe…#230

Merged
sedv8808 merged 1 commit into
productionfrom
develop
Jun 29, 2026
Merged

API-56 Fixed allowed domains, allow localhost to run for explorer whe…#230
sedv8808 merged 1 commit into
productionfrom
develop

Conversation

@sedv8808

Copy link
Copy Markdown
Collaborator

API-56
Fixed so that explorer developers can access even on dev/localhost modes.

Added yanbing's site.

Copilot AI review requested due to automatic review settings June 29, 2026 22:16
@sedv8808 sedv8808 merged commit 64809f7 into production Jun 29, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the API’s CORS configuration to broaden permitted browser origins, aiming to support Explorer development workflows (including localhost) and add an additional approved site.

Changes:

  • Added https://yanbingchen.site to the hard-coded CORS allowlist.
  • Modified localhost CORS handling to allow localhost origins (and added logging on rejection).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app.js
Comment on lines +48 to 50
if (localhostRe.test(origin)) return callback(null, true);
console.error(`CORS rejected origin: ${origin}`);
return callback(new Error(`CORS: origin ${origin} not allowed`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants