|
|
@@ -27,6 +27,7 @@ func (m *middleware) handleCORS(next http.Handler) http.Handler {
|
|
|
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
|
|
w.Header().Set("Access-Control-Allow-Headers", "X-Auth-Token")
|
|
|
if r.Method == http.MethodOptions {
|
|
|
+ w.Header().Set("Access-Control-Max-Age", "3600")
|
|
|
w.WriteHeader(http.StatusOK)
|
|
|
return
|
|
|
}
|