Skip to content

feat(cors): Add CORS policy check and response to browsers. #450

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

AOrazaev
Copy link

No description provided.

@AOrazaev
Copy link
Author

@microsoft-github-policy-service agree

@AOrazaev AOrazaev force-pushed the orazaev/cors_support branch from b21f59d to 770eae1 Compare May 20, 2025 01:24
src/program.ts Outdated
@@ -34,6 +34,7 @@ program
.option('--caps <caps>', 'comma-separated list of capabilities to enable, possible values: tabs, pdf, history, wait, files, install. Default is all.')
.option('--cdp-endpoint <endpoint>', 'CDP endpoint to connect to.')
.option('--config <path>', 'path to the configuration file.')
.option('--cors-allow-origins <origin>', 'semicolon-separated list of allowed origins by CORS policy. Can be regex.', semicolonSeparatedList)
Copy link
Member

Choose a reason for hiding this comment

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

It'd be nice if origins syntax was consistent (blocked, allowed, cors). Let's not support regex here.

Copy link
Author

Choose a reason for hiding this comment

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

Great, let me make the changes.

Copy link
Author

Choose a reason for hiding this comment

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

Done:

  • Renamed to --cors-allowed-origins.
  • Replaced regex check with equality check.

@AOrazaev AOrazaev force-pushed the orazaev/cors_support branch from bfe66d6 to 9eeab1e Compare May 28, 2025 22:41
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