Skip to content
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

[Merged by Bors] - Add ability to configure CORS header #1345

Closed
wants to merge 2 commits into from

Conversation

adaszko
Copy link
Contributor

@adaszko adaszko commented Jul 8, 2020

Issue Addressed

#1177

Proposed Changes

Add a command line option (--http-allow-origin) and a config item for configuring the Access-Control-Allow-Origin response header. This should unblock making XMLHttpRequests.

@adaszko adaszko added the ready-for-review The code is ready for review label Jul 8, 2020
@adaszko adaszko force-pushed the pr/rest-api-cors branch from dd0fc37 to 787a56e Compare July 9, 2020 06:39
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Nice! Only one super small suggestion for the CLI help text.

@paulhauner paulhauner added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jul 14, 2020
Arg::with_name("http-allow-origin")
.long("http-allow-origin")
.value_name("ORIGIN")
.help("Set the value of the Access-Control-Allow-Origin response HTTP header")
Copy link
Member

@paulhauner paulhauner Jul 14, 2020

Choose a reason for hiding this comment

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

Do you think it might be helpful to add Put *, to allow any origin (or similar) to this help text? I'm not sure I'd know what to set it to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. It won't do any harm.

@adaszko adaszko force-pushed the pr/rest-api-cors branch from 787a56e to 760e936 Compare July 14, 2020 11:41
@adaszko adaszko added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jul 14, 2020
@paulhauner paulhauner added ready-to-squerge and removed ready-for-review The code is ready for review labels Jul 16, 2020
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Great!

bors r+

bors bot pushed a commit that referenced this pull request Jul 16, 2020
## Issue Addressed

#1177

## Proposed Changes

Add a command line option (`--http-allow-origin`) and a config item for configuring the `Access-Control-Allow-Origin` response header.  This should unblock making XMLHttpRequests.
@bors bors bot changed the title Add ability to configure CORS header [Merged by Bors] - Add ability to configure CORS header Jul 16, 2020
@bors bors bot closed this Jul 16, 2020
@adaszko adaszko deleted the pr/rest-api-cors branch August 5, 2020 14:27
@paulhauner paulhauner mentioned this pull request Sep 25, 2020
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