[ARVADOS] updated: 1.1.0-19-g3d5ee53

Git user git at public.curoverse.com
Fri Oct 13 11:56:22 EDT 2017


Summary of changes:
 services/keep-web/handler.go      | 2 +-
 services/keep-web/handler_test.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

       via  3d5ee53dbf5ae2806cd6540afecc6328267da62f (commit)
      from  a23fa06e9849f2ab76fa271624e22a245c2abc47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3d5ee53dbf5ae2806cd6540afecc6328267da62f
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Fri Oct 13 09:15:37 2017 -0400

    12216: Allow Content-Type header via CORS.
    
    AJAX libraries set Content-Type automatically, and it's safe for us to
    accept it, so this means one less obstacle for browser applications.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 1798d2c..28dbb66 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -146,7 +146,7 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
 			statusCode = http.StatusMethodNotAllowed
 			return
 		}
-		w.Header().Set("Access-Control-Allow-Headers", "Range")
+		w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Range")
 		w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PROPFIND")
 		w.Header().Set("Access-Control-Allow-Origin", "*")
 		w.Header().Set("Access-Control-Max-Age", "86400")
diff --git a/services/keep-web/handler_test.go b/services/keep-web/handler_test.go
index d877a5f..190554d 100644
--- a/services/keep-web/handler_test.go
+++ b/services/keep-web/handler_test.go
@@ -46,7 +46,7 @@ func (s *UnitSuite) TestCORSPreflight(c *check.C) {
 	c.Check(resp.Body.String(), check.Equals, "")
 	c.Check(resp.Header().Get("Access-Control-Allow-Origin"), check.Equals, "*")
 	c.Check(resp.Header().Get("Access-Control-Allow-Methods"), check.Equals, "GET, POST, OPTIONS, PROPFIND")
-	c.Check(resp.Header().Get("Access-Control-Allow-Headers"), check.Equals, "Range")
+	c.Check(resp.Header().Get("Access-Control-Allow-Headers"), check.Equals, "Content-Type, Range")
 
 	// Check preflight for a disallowed request
 	resp = httptest.NewRecorder()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list