forked from monsur/enable-cors.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server_tomcat.html
23 lines (21 loc) · 870 Bytes
/
server_tomcat.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
layout: default
title: enable cross-origin resource sharing
---
<div class="container">
<section>
<h1>CORS on Tomcat</h1>
<p>Apache Tomcat includes support for CORS (Starting from Tomcat version 7.0.41). The full documentation can be found here: <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter">http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter</a></p>
<p>Here is an example from those docs that demonstrates a minimal CORS configuration:</p>
<pre class="code">
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</pre>
</section>
</div>