Skip to content

Instantly share code, notes, and snippets.

@FalconIA
Created May 18, 2018 07:23
Show Gist options
  • Save FalconIA/52c25ae8da374a95fe4bd286bcb88e91 to your computer and use it in GitHub Desktop.
Save FalconIA/52c25ae8da374a95fe4bd286bcb88e91 to your computer and use it in GitHub Desktop.
CORS filter in tomcat
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</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