-
Notifications
You must be signed in to change notification settings - Fork 703
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
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
b21f59d
to
770eae1
Compare
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Do strict string check instead of regex.
bfe66d6
to
9eeab1e
Compare
No description provided.