famosss
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
weed/s3api/s3api_server.go
|
|
@ -87,6 +87,13 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) { |
|
|
|
// Readiness Probe
|
|
|
|
apiRouter.Methods("GET").Path("/status").HandlerFunc(s3a.StatusHandler) |
|
|
|
|
|
|
|
apiRouter.Methods("OPTIONS").HandlerFunc( |
|
|
|
func(w http.ResponseWriter, r *http.Request){ |
|
|
|
w.Header().Set("Access-Control-Allow-Origin", "*") |
|
|
|
w.Header().Set("Access-Control-Allow-Credentials", "true") |
|
|
|
writeSuccessResponseEmpty(w, r) |
|
|
|
}) |
|
|
|
|
|
|
|
var routers []*mux.Router |
|
|
|
if s3a.option.DomainName != "" { |
|
|
|
domainNames := strings.Split(s3a.option.DomainName, ",") |
|
|
|