fix: group moderation and profile sync

This commit is contained in:
richjohnrambo
2026-10-17 10:12:20 +08:00
parent ea29fef40f
commit 9132207e21
9 changed files with 126 additions and 19 deletions
+3 -1
View File
@@ -298,7 +298,9 @@ func CORSHandler(method string, reqHeader http.Header, allowedOrigins []AllowedO
return respHeader, http.StatusNoContent
}
respHeader["Access-Control-Allow-Headers"] = []string{"*"}
if requestedHeaders := reqHeader.Get("Access-Control-Request-Headers"); requestedHeaders != "" {
respHeader["Access-Control-Allow-Headers"] = []string{requestedHeaders}
}
respHeader["Access-Control-Allow-Credentials"] = []string{"true"}
respHeader["Access-Control-Allow-Methods"] = []string{strings.Join(allowMethods, ", ")}
respHeader["Access-Control-Max-Age"] = []string{"86400"}