mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fix: cors handling again for not just OPTIONS request (#10025)
CORS is notorious requires specific headers to be handled appropriately in request and response, using cors package as part of handlerFunc() for options method lacks the necessary control this package needs to add headers.
This commit is contained in:
@@ -466,7 +466,7 @@ func serverMain(ctx *cli.Context) {
|
||||
}
|
||||
}()
|
||||
|
||||
httpServer := xhttp.NewServer([]string{globalMinioAddr}, criticalErrorHandler{handler}, getCert)
|
||||
httpServer := xhttp.NewServer([]string{globalMinioAddr}, criticalErrorHandler{corsHandler(handler)}, getCert)
|
||||
httpServer.ErrorLog = log.New(pw, "", 0)
|
||||
httpServer.BaseContext = func(listener net.Listener) context.Context {
|
||||
return GlobalContext
|
||||
|
||||
Reference in New Issue
Block a user