fix(backend): added Content-Encoding to CORS for http service (#1245)
This commit is contained in:
parent
7683c27abc
commit
3d193fd1d2
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ func (e *Router) corsMiddleware(next http.Handler) http.Handler {
|
||||||
// Prepare headers for preflight requests
|
// Prepare headers for preflight requests
|
||||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
w.Header().Set("Access-Control-Allow-Methods", "POST")
|
w.Header().Set("Access-Control-Allow-Methods", "POST")
|
||||||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type,Authorization")
|
w.Header().Set("Access-Control-Allow-Headers", "Content-Type,Authorization,Content-Encoding")
|
||||||
if r.Method == http.MethodOptions {
|
if r.Method == http.MethodOptions {
|
||||||
w.Header().Set("Cache-Control", "max-age=86400")
|
w.Header().Set("Cache-Control", "max-age=86400")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue