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 errors between regions and spatial #7

Open
vjrj opened this issue Dec 2, 2020 · 2 comments
Open

CORS errors between regions and spatial #7

vjrj opened this issue Dec 2, 2020 · 2 comments
Assignees

Comments

@vjrj
Copy link
Collaborator

vjrj commented Dec 2, 2020

As reported by @jloomisVCE the are some CORS issues between regions and spatial, with the generated inventories:

regions.vtatlasoflife.org does not support map-clicks due to CORS errors.

In the js console:

/#rt=Vermont%20Counties:1 Access to XMLHttpRequest at 'https://spatial.vtatlasoflife.org/geoserver/ALA/wms?SERVICE=WMS&VERSION=1.1…3817.17417969%2C5175704.05852539%2C-7369752.5181176765%2C5760294.450769044' from origin 'https://regions.vtatlasoflife.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
@vjrj vjrj self-assigned this Dec 2, 2020
@jloomisVCE
Copy link
Contributor

jloomisVCE commented Dec 2, 2020

I think spatial /geoserver just needs to set ACAO * header.

To test, I just un-commented this line in /etc/nginx/sites-enabled/spatial.vtatlasoflife.org.conf.conf

location /geoserver {
...
include /etc/nginx/conf.d/ala_cors_geoserver;
}

This fixes the CORS error (for this specific issue). I recall we had some problem with CORS includes, which led to commenting these. I also forget why the vhost fragments don't work, but in those under /etc/nginx/sites-available, the CORS includes are active.

@vjrj
Copy link
Collaborator Author

vjrj commented Dec 3, 2020

Can you share with me your vhost for spatial and regions? thanks

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