From cef23c60a41d00953037888e755fa796fab3568d Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Mon, 25 Apr 2016 16:20:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/webapp/WEB-INF/web.xml | 47 ++++++++++++++++++++-- .../src/main/webapp/clientaccesspolicy.xml | 13 ++++++ .../src/main/webapp/crossdomain.xml | 4 -- 3 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 platform-operate-api/src/main/webapp/clientaccesspolicy.xml diff --git a/platform-operate-api/src/main/webapp/WEB-INF/web.xml b/platform-operate-api/src/main/webapp/WEB-INF/web.xml index a0add13..e9d47b2 100644 --- a/platform-operate-api/src/main/webapp/WEB-INF/web.xml +++ b/platform-operate-api/src/main/webapp/WEB-INF/web.xml @@ -12,6 +12,49 @@ + + + + CorsFilter + org.apache.catalina.filters.CorsFilter + + cors.allowed.origins + * + + + cors.allowed.methods + GET,POST,HEAD,OPTIONS,PUT,DELETE + + + cors.allowed.headers + Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization + + + cors.exposed.headers + Access-Control-Allow-Origin,Access-Control-Allow-Credentials + + + cors.support.credentials + true + + + cors.preflight.maxage + 10 + + + + CorsFilter + /* + + + + + default + *.xml + + + + contextConfigLocation @@ -27,10 +70,6 @@ classpath:log4j_config.xml - webAppRootKey - webapp.operate - - log4jRefreshInterval 60000 diff --git a/platform-operate-api/src/main/webapp/clientaccesspolicy.xml b/platform-operate-api/src/main/webapp/clientaccesspolicy.xml new file mode 100644 index 0000000..f182607 --- /dev/null +++ b/platform-operate-api/src/main/webapp/clientaccesspolicy.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-operate-api/src/main/webapp/crossdomain.xml b/platform-operate-api/src/main/webapp/crossdomain.xml index 141465a..e69de29 100644 --- a/platform-operate-api/src/main/webapp/crossdomain.xml +++ b/platform-operate-api/src/main/webapp/crossdomain.xml @@ -1,4 +0,0 @@ - - - - \ No newline at end of file -- 1.8.3.1