mapserver-docker icon indicating copy to clipboard operation
mapserver-docker copied to clipboard

How to enable CORS?

Open macfikry opened this issue 4 years ago • 1 comments

How to enable CORS? It says Access to image at 'http://localhost:8182/mapserv.exe?map=/map/21.map&mode=map&layers=all&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=ind_provinces&CRS=EPSG%3A3857&STYLES=&WIDTH=1561&HEIGHT=668&BBOX=10816145.25046558%2C-144771.73157212383%2C11770079.363464583%2C263401.9994707174' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

macfikry avatar May 11 '20 00:05 macfikry

Quite old but if anybody ends up here, then add add_header 'Access-Control-Allow-Origin' '*'; to nginx configuration.

m2rt avatar Sep 05 '22 05:09 m2rt