[MINOR] Support PUT in Access-Control-Allow-Methods

Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/7d502533
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/7d502533
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/7d502533

Branch: refs/heads/master
Commit: 7d5025336b647ed7afc21e6ddbbeaac2c074ea36
Parents: 4b53793
Author: Hao Chen <h...@apache.org>
Authored: Mon Oct 10 19:19:35 2016 +0800
Committer: Hao Chen <h...@apache.org>
Committed: Mon Oct 10 19:19:35 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/eagle/alert/resource/SimpleCORSFiler.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/7d502533/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/resource/SimpleCORSFiler.java
----------------------------------------------------------------------
diff --git 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/resource/SimpleCORSFiler.java
 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/resource/SimpleCORSFiler.java
index 2e1c72c..5b8141c 100644
--- 
a/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/resource/SimpleCORSFiler.java
+++ 
b/eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/resource/SimpleCORSFiler.java
@@ -44,15 +44,15 @@ public class SimpleCORSFiler implements Filter {
         ServletException {
         HttpServletResponse response = (HttpServletResponse) res;
         response.setHeader("Access-Control-Allow-Origin", "*");
-        response.setHeader("Access-Control-Allow-Methods", "HEAD, POST, GET, 
OPTIONS, DELETE");
+        response.setHeader("Access-Control-Allow-Methods", "HEAD, POST, GET, 
PUT, OPTIONS, DELETE");
         response.setHeader("Access-Control-Max-Age", "3600");
         response.setHeader("Access-Control-Allow-Headers",
-            "Origin, Accept, X-Requested-With, Content-Type, 
Access-Control-Request-Method, Access-Control-Request-Headers");
+                "Origin, Accept, X-Requested-With, Content-Type, 
Access-Control-Request-Method, Access-Control-Request-Headers");
         chain.doFilter(request, response);
     }
 
     @Override
     public void destroy() {
-    }
 
+    }
 }

Reply via email to