Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 3, 2025

Add allowedOrigins option to CLI and setupSidecar API for configuring
additional CORS origins beyond the built-in defaults (localhost, machine
IPs, spotlightjs.com). This addresses use cases like custom local domains,
tunneling services (ngrok, localtunnel), Docker containers, and LAN access.

The option supports two matching modes: full origins (e.g., https://ngrok.io:443)
for strict matching, and plain domains (e.g., myapp.local) to allow any
protocol/port combination. Multiple origins can be specified via repeatable
flags or comma-separated values.

Fixes #1171

Add allowedOrigins option to CLI and setupSidecar API for configuring
additional CORS origins beyond the built-in defaults (localhost, machine
IPs, spotlightjs.com). This addresses use cases like custom local domains,
tunneling services (ngrok, localtunnel), Docker containers, and LAN access.

The option supports two matching modes: full origins (e.g., https://ngrok.io:443)
for strict matching, and plain domains (e.g., myapp.local) to allow any
protocol/port combination. Multiple origins can be specified via repeatable
flags or comma-separated values.

Fixes #1171
@BYK BYK deployed to Preview December 3, 2025 03:15 — with GitHub Actions Active
@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
spotlightjs Skipped Skipped Dec 3, 2025 3:42am

@BYK BYK deployed to Preview December 3, 2025 03:30 — with GitHub Actions Active
@BYK BYK deployed to Preview December 3, 2025 03:42 — with GitHub Actions Active
@BYK BYK marked this pull request as ready for review December 3, 2025 03:47
@BYK BYK merged commit 75a1848 into main Dec 3, 2025
20 checks passed
@BYK BYK deleted the byk/feat/cors-allow-list branch December 3, 2025 03:58
BYK pushed a commit that referenced this pull request Dec 3, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/[email protected]

### Minor Changes

- Add `--allowed-origin` / `-A` CLI option and `allowedOrigins` API
option for configuring additional CORS origins. Supports both full
origins (e.g., `https://ngrok.io:443`) for strict matching and plain
domains (e.g., `myapp.local`) for permissive matching. Fixes
[#1171](#1171).
([#1176](#1176))

### Patch Changes

- Restore draggable electron app and recover semaphore buttons
([#1173](#1173))

- Allow any DNS pointing to localhost in CORS
([#1175](#1175))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

CORS restrictions missing configuration for additional allowed origins

2 participants