summaryrefslogtreecommitdiff
path: root/plugins/headers/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-21 16:08:06 +0300
committerValery Piashchynski <[email protected]>2021-01-21 16:08:06 +0300
commit8029e2d1107e4663f1104ebf25c40f252c8ea111 (patch)
tree7c9a6744fa9ce130d80c634da3d7596f70fda51a /plugins/headers/config.go
parent7da6c78449776e1f3c6716250bca0b712a0423a4 (diff)
Fix headers configs
Update rr.yaml Remove previous stderr messages when they were sent
Diffstat (limited to 'plugins/headers/config.go')
-rw-r--r--plugins/headers/config.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/headers/config.go b/plugins/headers/config.go
index 8d4e29c2..688b4764 100644
--- a/plugins/headers/config.go
+++ b/plugins/headers/config.go
@@ -2,7 +2,7 @@ package headers
// Config declares headers service configuration.
type Config struct {
- Headers struct {
+ Headers *struct {
// CORS settings.
CORS *CORSConfig
@@ -17,20 +17,20 @@ type Config struct {
// CORSConfig headers configuration.
type CORSConfig struct {
// AllowedOrigin: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
- AllowedOrigin string
+ AllowedOrigin string `mapstructure:"allowed_origin"`
// AllowedHeaders: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
- AllowedHeaders string
+ AllowedHeaders string `mapstructure:"allowed_headers"`
// AllowedMethods: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
- AllowedMethods string
+ AllowedMethods string `mapstructure:"allowed_methods"`
// AllowCredentials https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
- AllowCredentials *bool
+ AllowCredentials *bool `mapstructure:"allow_credentials"`
// ExposeHeaders: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
- ExposedHeaders string
+ ExposedHeaders string `mapstructure:"exposed_headers"`
// MaxAge of CORS headers in seconds/
- MaxAge int
+ MaxAge int `mapstructure:"max_age"`
}