Created
July 15, 2016 17:09
-
-
Save amccarty/66488da19fef8510d9bcaa72d94b218b to your computer and use it in GitHub Desktop.
CORS config for jetty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /path/to/server/solr-webapp/webapp/WEB-INF/web.xml | |
<filter> | |
<filter-name>cross-origin</filter-name> | |
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> | |
<init-param> | |
<param-name>allowedOrigins</param-name> | |
<param-value>http://localhost*</param-value> | |
</init-param> | |
<init-param> | |
<param-name>allowedMethods</param-name> | |
<param-value>GET,POST,DELETE,PUT,HEAD,OPTIONS</param-value> | |
</init-param> | |
<init-param> | |
<param-name>allowedHeaders</param-name> | |
<param-value>origin, content-type, cache-control, accept, options, authorization, x-requested-with</param-value> | |
</init-param> | |
<init-param> | |
<param-name>supportsCredentials</param-name> | |
<param-value>true</param-value> | |
</init-param> | |
<init-param> | |
<param-name>chainPreflight</param-name> | |
<param-value>false</param-value> | |
</init-param> | |
</filter> | |
<filter-mapping> | |
<filter-name>cross-origin</filter-name> | |
<url-pattern>/*</url-pattern> | |
</filter-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment