aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-03-04 15:22:23 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-03-04 15:22:23 +0100
commit32c092523228f370edb5a8246a09881e0245e1a6 (patch)
tree28219f8a5ae88b36054423199f20986e3bf23238
parentadf4183e807cc00c8d824fcdd9476ec6ca7a789e (diff)
downloadpdf-as-4-32c092523228f370edb5a8246a09881e0245e1a6.tar.gz
pdf-as-4-32c092523228f370edb5a8246a09881e0245e1a6.tar.bz2
pdf-as-4-32c092523228f370edb5a8246a09881e0245e1a6.zip
enabled CORS header
-rw-r--r--pdf-as-web/build.gradle2
-rw-r--r--pdf-as-web/src/main/webapp/WEB-INF/web.xml14
2 files changed, 15 insertions, 1 deletions
diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle
index 31c34ac6..765502f2 100644
--- a/pdf-as-web/build.gradle
+++ b/pdf-as-web/build.gradle
@@ -35,6 +35,8 @@ dependencies {
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'org.apache.cxf:cxf-rt-transports-http:3.0.1'
compile 'org.apache.cxf:cxf-rt-frontend-jaxws:3.0.1'
+ compile 'com.thetransactioncompany:cors-filter:2.3'
+
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
diff --git a/pdf-as-web/src/main/webapp/WEB-INF/web.xml b/pdf-as-web/src/main/webapp/WEB-INF/web.xml
index b6cfb46d..5ed5d5a9 100644
--- a/pdf-as-web/src/main/webapp/WEB-INF/web.xml
+++ b/pdf-as-web/src/main/webapp/WEB-INF/web.xml
@@ -25,12 +25,21 @@
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
+ <filter>
+ <filter-name>CORS</filter-name>
+ <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
+ <init-param>
+ <param-name>cors.allowOrigin</param-name>
+ <param-value>*</param-value>
+ </init-param>
+ </filter>
<!-- filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping-->
+
<filter-mapping>
<filter-name>ExceptionCatchFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -39,7 +48,10 @@
<filter-name>UserAgentFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-
+ <filter-mapping>
+ <filter-name>CORS</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
<!-- listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener-->