In most scenarios you will probably configure CORS on a proxy level, but in case you want to enable CORS in the geoserver directly, this can be done easily now by setting the new environment variable CORS_ENABLED to true. In that case, the startup.sh script will add the necessary filter definitions to the web.xml.
Origins, methods and headers can (optionally) be configured with these new environment values:
This PR enables (optional) CORS support.
In most scenarios you will probably configure CORS on a proxy level, but in case you want to enable CORS in the geoserver directly, this can be done easily now by setting the new environment variable
CORS_ENABLED
totrue
. In that case, thestartup.sh
script will add the necessary filter definitions to theweb.xml
.Origins, methods and headers can (optionally) be configured with these new environment values:
CORS_ALLOWED_ORIGINS
(default:*
)CORS_ALLOWED_METHODS
(default:GET,POST,PUT,DELETE,HEAD,OPTIONS
)CORS_ALLOWED_HEADERS
(default:*
)By default, CORS is not enabled!