add missing cors config

This commit is contained in:
Michael Barz
2023-03-31 23:18:00 +02:00
parent 8f6f52c2ec
commit e313248cee
9 changed files with 94 additions and 0 deletions

View File

@@ -30,6 +30,12 @@ func DefaultConfig() *config.Config {
Addr: "127.0.0.1:9120",
Namespace: "com.owncloud.graph",
Root: "/graph",
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
AllowCredentials: true,
},
},
Service: config.Service{
Name: "graph",