update CORS middleware and make it configurable
This commit is contained in:
@@ -18,10 +18,19 @@ type Debug struct {
|
||||
Zpages bool
|
||||
}
|
||||
|
||||
// CORS defines the available cors configuration.
|
||||
type CORS struct {
|
||||
AllowedOrigins []string
|
||||
AllowedMethods []string
|
||||
AllowedHeaders []string
|
||||
AllowCredentials bool
|
||||
}
|
||||
|
||||
// HTTP defines the available http configuration.
|
||||
type HTTP struct {
|
||||
Addr string
|
||||
Root string
|
||||
CORS CORS
|
||||
}
|
||||
|
||||
// Service defines the available service configuration.
|
||||
@@ -42,13 +51,13 @@ type Tracing struct {
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
type Config struct {
|
||||
File string
|
||||
Log Log
|
||||
Debug Debug
|
||||
HTTP HTTP
|
||||
Tracing Tracing
|
||||
Service Service
|
||||
OcisPublicURL string
|
||||
File string
|
||||
Log Log
|
||||
Debug Debug
|
||||
HTTP HTTP
|
||||
Tracing Tracing
|
||||
Service Service
|
||||
OcisPublicURL string
|
||||
WebdavNamespace string
|
||||
|
||||
Context context.Context
|
||||
|
||||
Reference in New Issue
Block a user