summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-04-06 22:24:06 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2012-04-06 22:24:06 +0000
commit7438c0ac7dc2ae6f03a0329444a6e3eabfbac048 (patch)
tree8a81b94fd0e21829ccb4e1dc840ecad92cfb1f01
parentc9591931228285a92433d28972c158395f1f276f (diff)
Add Content-Type to the allowed headers
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1310618 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/cors/CORSHeaderProcessor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/cors/CORSHeaderProcessor.java b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/cors/CORSHeaderProcessor.java
index daa31d5b2e..644800c5dc 100644
--- a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/cors/CORSHeaderProcessor.java
+++ b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/cors/CORSHeaderProcessor.java
@@ -30,7 +30,7 @@ public class CORSHeaderProcessor {
if(config == null) {
response.setHeader("Access-Control-Allow-Origin", "*");
- response.setHeader("Access-Control-Allow-Headers", "X-Requested-With");
+ response.setHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type");
if (request.getMethod().equals("OPTIONS")) {
response.setHeader("Access-Control-Allow-Methods", "OPTIONS, HEAD, GET, POST, PUT, DELETE");
response.setHeader("Access-Control-Max-Age", "1728000");
@@ -61,11 +61,11 @@ public class CORSHeaderProcessor {
}
private static String getAllowHeaders(CORSConfiguration config) {
- return getListValues(config.getAllowHeaders(), "X-Requested-With");
+ return getListValues(config.getAllowHeaders(), "X-Requested-With, Content-Type");
}
private static String getExposeHeaders(CORSConfiguration config) {
- return getListValues(config.getExposeHeaders(), "X-Requested-With");
+ return getListValues(config.getExposeHeaders(), "X-Requested-With, Content-Type");
}
private static String getListValues(List<String> list, String defaultValue) {