mirror of
https://github.com/minio/minio.git
synced 2025-03-03 07:10:07 -05:00
parent
8eb838bf91
commit
b052bfa79e
@ -375,9 +375,18 @@ var defaultAllowableHTTPMethods = []string{
|
|||||||
|
|
||||||
// setCorsHandler handler for CORS (Cross Origin Resource Sharing)
|
// setCorsHandler handler for CORS (Cross Origin Resource Sharing)
|
||||||
func setCorsHandler(h http.Handler) http.Handler {
|
func setCorsHandler(h http.Handler) http.Handler {
|
||||||
commonS3Headers := []string{"Content-Length", "Content-Type", "Connection",
|
commonS3Headers := []string{
|
||||||
"Date", "ETag", "Server", "x-amz-delete-marker", "x-amz-id-2",
|
"Date",
|
||||||
"x-amz-request-id", "x-amz-version-id"}
|
"ETag",
|
||||||
|
"Server",
|
||||||
|
"Connection",
|
||||||
|
"Accept-Ranges",
|
||||||
|
"Content-Range",
|
||||||
|
"Content-Encoding",
|
||||||
|
"Content-Length",
|
||||||
|
"Content-Type",
|
||||||
|
"x-amz-request-id",
|
||||||
|
}
|
||||||
c := cors.New(cors.Options{
|
c := cors.New(cors.Options{
|
||||||
AllowedOrigins: []string{"*"},
|
AllowedOrigins: []string{"*"},
|
||||||
AllowedMethods: defaultAllowableHTTPMethods,
|
AllowedMethods: defaultAllowableHTTPMethods,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user