Add Refresh-Token to the list of Access-Control-Allow-Headers

This commit is contained in:
M. Mert Yildiran
2023-05-24 02:04:56 +03:00
parent 4bb68afaaf
commit bf731073c8
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ func getRerouteHttpHandlerSelfAPI(proxyHandler http.Handler, selfNamespace strin
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Credentials", "true")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With, x-session-token")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With, x-session-token, Refresh-Token")
w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, DELETE")
if r.Method == "OPTIONS" {