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

PB-934: Removed origin check #63

Merged
merged 1 commit into from
Aug 29, 2024
Merged

PB-934: Removed origin check #63

merged 1 commit into from
Aug 29, 2024

Conversation

ltshb
Copy link
Contributor

@ltshb ltshb commented Aug 28, 2024

Allow request if no origin/referer is set. If an origin is set, then returns
correct CORS headers.

Allow request if no origin/referer is set. If an origin is set, then returns
correct CORS headers.
Copy link
Contributor

@boecklic boecklic left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines +47 to +48
if 'Referer' in request.headers and is_domain_allowed(request.headers['Referer']):
cors_origin = request.headers['Referer']
Copy link
Contributor

Choose a reason for hiding this comment

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

so Referer wins over Origin? Why not just check for Origin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because some browser like IOS, see #59, don't set origin but referer. So we need this in order to avoid CORS issue on some browser.

@ltshb ltshb merged commit ec0ad73 into develop Aug 29, 2024
3 checks passed
@ltshb ltshb deleted the feat-PB-934-qrcode-origin branch August 29, 2024 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants