Merge pull request #6912 from 2403905/issue-5108

Fix CORS issues
This commit is contained in:
Roman Perekhod
2023-07-28 12:53:34 +02:00
committed by GitHub
5 changed files with 10 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix CORS issues
We fixed the CORS issues when client asking for the 'Cache-Control' header before load the file
https://github.com/owncloud/ocis/pull/6912
https://github.com/owncloud/ocis/issues/5108

View File

@@ -70,6 +70,7 @@ func DefaultConfig() *config.Config {
"Upload-Checksum",
"Upload-Offset",
"X-HTTP-Method-Override",
"Cache-Control",
},
AllowCredentials: true,
},

View File

@@ -69,6 +69,7 @@ func DefaultConfig() *config.Config {
"Upload-Checksum",
"Upload-Offset",
"X-HTTP-Method-Override",
"Cache-Control",
},
AllowCredentials: true,
},

View File

@@ -31,7 +31,7 @@ func DefaultConfig() *config.Config {
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With", "X-Request-Id"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With", "X-Request-Id", "Cache-Control"},
AllowCredentials: true,
},
},

View File

@@ -32,7 +32,7 @@ func DefaultConfig() *config.Config {
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With", "X-Request-Id"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With", "X-Request-Id", "Cache-Control"},
AllowCredentials: true,
},
},