From 2926920f26bf591ca7cd01cb427f582a2b8a9727 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 16 Nov 2017 10:26:28 -0800 Subject: [PATCH] Add CORS headers to client fs endpoints --- command/agent/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/http.go b/command/agent/http.go index 1499eab6d..4146cffd4 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -158,7 +158,7 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) { s.mux.HandleFunc("/v1/acl/token", s.wrap(s.ACLTokenSpecificRequest)) s.mux.HandleFunc("/v1/acl/token/", s.wrap(s.ACLTokenSpecificRequest)) - s.mux.HandleFunc("/v1/client/fs/", s.wrap(s.FsRequest)) + s.mux.Handle("/v1/client/fs/", wrapCORS(s.wrap(s.FsRequest))) s.mux.HandleFunc("/v1/client/gc", s.wrap(s.ClientGCRequest)) s.mux.Handle("/v1/client/stats", wrapCORS(s.wrap(s.ClientStatsRequest))) s.mux.Handle("/v1/client/allocation/", wrapCORS(s.wrap(s.ClientAllocRequest)))