fix preflight requests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2023-05-19 16:10:36 +02:00
committed by Michael Barz
parent 4080b85033
commit 0edb2b9c5b
9 changed files with 68 additions and 6 deletions

View File

@@ -30,6 +30,51 @@ func DefaultConfig() *config.Config {
Root: "/",
Namespace: "com.owncloud.web",
CacheTTL: 604800, // 7 days
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{
"OPTIONS",
"HEAD",
"GET",
"PUT",
"PATCH",
"POST",
"DELETE",
"MKCOL",
"PROPFIND",
"PROPPATCH",
"MOVE",
"COPY",
"REPORT",
"SEARCH",
},
AllowedHeaders: []string{
"Origin",
"Accept",
"Content-Type",
"Depth",
"Authorization",
"Ocs-Apirequest",
"If-None-Match",
"If-Match",
"Destination",
"Overwrite",
"X-Request-Id",
"X-Requested-With",
"Tus-Resumable",
"Tus-Checksum-Algorithm",
"Upload-Concat",
"Upload-Length",
"Upload-Metadata",
"Upload-Defer-Length",
"Upload-Expires",
"Upload-Checksum",
"Upload-Offset",
"X-HTTP-Method-Override",
},
AllowCredentials: true,
},
},
Service: config.Service{
Name: "web",