diff options
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/api0/client.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/api0/client.go b/pkg/api/api0/client.go index ea3ce9c..a01c170 100644 --- a/pkg/api/api0/client.go +++ b/pkg/api/api0/client.go @@ -572,6 +572,10 @@ func (h *Handler) handleClientServers(w http.ResponseWriter, r *http.Request) { w.Header().Set("Expires", "0") w.Header().Set("Pragma", "no-cache") + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET, HEAD") + w.Header().Set("Access-Control-Max-Age", "86400") + if r.Method == http.MethodOptions { w.Header().Set("Allow", "OPTIONS, HEAD, GET") w.WriteHeader(http.StatusNoContent) |