mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-05 11:00:12 -05:00
update CORS middleware and make it configurable
This commit is contained in:
@@ -18,12 +18,21 @@ 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
|
||||
Namespace string
|
||||
Root string
|
||||
CacheTTL int
|
||||
CORS CORS
|
||||
}
|
||||
|
||||
// GRPC defines the available grpc configuration.
|
||||
|
||||
Reference in New Issue
Block a user