mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-12 21:58:58 -04:00
expect only the tus related cors allow header values
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
1 parent
738ec6de67
commit
f065e8acdc
2 files changed
+4
-2
No files matched your search
@@ -60,6 +60,7 @@ func DefaultConfig() *config.Config {
|
||||
"Upload-Metadata",
|
||||
"Upload-Defer-Length",
|
||||
"Upload-Concat",
|
||||
"Upload-Complete",
|
||||
"Upload-Incomplete",
|
||||
"Upload-Draft-Interop-Version",
|
||||
},
|
||||
@@ -75,6 +76,7 @@ func DefaultConfig() *config.Config {
|
||||
"Upload-Metadata",
|
||||
"Upload-Defer-Length",
|
||||
"Upload-Concat",
|
||||
"Upload-Complete",
|
||||
"Upload-Incomplete",
|
||||
"Upload-Draft-Interop-Version",
|
||||
},
|
||||
|
||||
@@ -152,13 +152,13 @@ Feature: CORS headers
|
||||
When user "Alice" sends HTTP method "OPTIONS" to URL "<endpoint>" with headers
|
||||
| header | value |
|
||||
| Origin | https://aphno.badal |
|
||||
| Access-Control-Request-Headers | accept,authorization,cache-control,content-type,depth,destination,if-match,if-none-match,ocs-apirequest,origin,overwrite,tus-checksum-algorithm,tus-resumable,upload-checksum,upload-concat,upload-defer-length,upload-expires,upload-length,upload-metadata,upload-offset,x-http-method-override,x-request-id,x-requested-with |
|
||||
| Access-Control-Request-Headers | Authorization,Origin,X-Requested-With,X-Request-Id,X-HTTP-Method-Override,Content-Type,Upload-Length,Upload-Offset,Tus-Resumable,Upload-Metadata,Upload-Defer-Length,Upload-Concat,Upload-Complete,Upload-Incomplete,Upload-Draft-Interop-Version |
|
||||
| Access-Control-Request-Method | <request-method> |
|
||||
# the tus handler returns 200 to be compatible with older browsers that don't support 204 for OPTIONS requests
|
||||
And the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Access-Control-Allow-Headers | accept,authorization,cache-control,content-type,depth,destination,if-match,if-none-match,ocs-apirequest,origin,overwrite,tus-checksum-algorithm,tus-resumable,upload-checksum,upload-concat,upload-defer-length,upload-expires,upload-length,upload-metadata,upload-offset,x-http-method-override,x-request-id,x-requested-with |
|
||||
| Access-Control-Allow-Headers | Authorization,Origin,X-Requested-With,X-Request-Id,X-HTTP-Method-Override,Content-Type,Upload-Length,Upload-Offset,Tus-Resumable,Upload-Metadata,Upload-Defer-Length,Upload-Concat,Upload-Complete,Upload-Incomplete,Upload-Draft-Interop-Version |
|
||||
| Access-Control-Allow-Origin | https://aphno.badal |
|
||||
| Access-Control-Allow-Methods | <request-method> |
|
||||
Examples:
|
||||
|
||||
Reference in new issue
Block a user