Update weed/s3api/s3api_server.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Chris Lu
2025-07-14 23:53:45 -07:00
committed by GitHub
co-authored by Copilot
parent aab2df4a5e
commit 76eafeae77
+3
View File
@@ -146,6 +146,9 @@ func (s3a *S3ApiServer) handleCORSOriginValidation(w http.ResponseWriter, r *htt
w.Header().Set("Access-Control-Expose-Headers", "*")
w.Header().Set("Access-Control-Allow-Methods", "*")
w.Header().Set("Access-Control-Allow-Headers", "*")
if s3a.option.AllowCredentials {
w.Header().Set("Access-Control-Allow-Credentials", "true")
}
return true
}