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

CORS problem due to missing min_zoom in layer water #130

Open
gregers666 opened this issue Jul 5, 2018 · 3 comments
Open

CORS problem due to missing min_zoom in layer water #130

gregers666 opened this issue Jul 5, 2018 · 3 comments

Comments

@gregers666
Copy link

Hello,

in case of error situation:

env/lib/python2.7/site-packages/tilequeue/process.py

min_zoom = output_props.get('min_zoom')
assert min_zoom is not None,
'Missing min_zoom in layer %s' % layer_name

the CORS „Access-Control-Allow-Origin” header is not generated...

Sincerely
Gregers

@nvkelso
Copy link
Member

nvkelso commented Jul 5, 2018

That's odd! Can you give an example tile coordinate (preferably with a public URL) for debugging, please? We're also happy to accept PRs :)

@gregers666
Copy link
Author

Sorry, but I'm firewalled. It was tileserver with imported https://download.geofabrik.de/europe/poland-latest.osm.pbf tested using nginx, apache2 to display the map (all sitting on the same machine).
As I see the problem is when assertion happens, there is an error generated, so the function that generates the header is omitted.
Commenting out quoted lines masks the problem allowing tileserver to work properly.

It was looking to be a CORS misconfiguration of apache or nginx forcing me to stray...

@zerebubuth
Copy link
Member

If I'm understanding werkzeug correctly, it looks like it might be difficult to add headers to its exceptions, unfortunately. We used to run tileserver behind a proxy, would it be possible for you to do the same? That way you can ensure that CORS headers are present on all the responses.

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

3 participants