Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save identityclash/cd650f17b40ddc7c0b42 to your computer and use it in GitHub Desktop.
Save identityclash/cd650f17b40ddc7c0b42 to your computer and use it in GitHub Desktop.
Add CORS Filter to Spring Maven
<!-- Append to pom.xml -->
<dependency>
<groupId>com.thetransactioncompany</groupId>
<artifactId>cors-filter</artifactId>
<version>1.8</version>
</dependency>
<!-- Append to web.xml -->
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CORS</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