fix(backend): added Content-Encoding to CORS for http service

This commit is contained in:
Alexander Zavorotynskiy 2023-05-09 17:35:17 +02:00
parent d1cd07cbd4
commit 2c6f9a15ab

View file

@ -119,7 +119,7 @@ func (e *Router) corsMiddleware(next http.Handler) http.Handler {
// Prepare headers for preflight requests
w.Header().Set("Access-Control-Allow-Origin", "*")
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 {
w.Header().Set("Cache-Control", "max-age=86400")
w.WriteHeader(http.StatusOK)