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

Allow Range headers for CORS #7

Closed
underwhelmingToaster opened this issue Mar 18, 2022 · 1 comment
Closed

Allow Range headers for CORS #7

underwhelmingToaster opened this issue Mar 18, 2022 · 1 comment

Comments

@underwhelmingToaster
Copy link

The following error occurs when trying to read a range from "https://qrank.wmcloud.org/download/osmviews.tiff":

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://qrank.wmcloud.org/download/osmviews.tiff. (Reason: header ‘range’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).

This is solved by allowing the range header:
Header set Access-Control-Allow-Headers "Range"

brawer added a commit that referenced this issue Mar 21, 2022
@brawer
Copy link
Owner

brawer commented Mar 21, 2022

Done.

$ curl -I -X OPTIONS https://qrank.wmcloud.org/download/osmviews.tiff
HTTP/2 204 
server: nginx/1.18.0
date: Mon, 21 Mar 2022 08:15:30 GMT
access-control-allow-headers: ETag, If-Match, If-None-Match, If-Modified-Since, If-Range, Range
access-control-allow-methods: GET, OPTIONS
access-control-allow-origin: *
access-control-expose-headers: ETag
access-control-max-age: 86400
allow: GET, OPTIONS
[...]

@brawer brawer closed this as completed Mar 21, 2022
brawer added a commit to brawer/osmviews that referenced this issue May 6, 2022
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

No branches or pull requests

2 participants