diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-13 11:58:39 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-13 11:58:39 -0800 |
commit | 59ee9fbb237673c2d0cccad42f7adbae65852b8d (patch) | |
tree | 3326e7c43eef2483fff5e24b7e2f840fb94b4d38 /system/admin/config/config.go | |
parent | 3249b82b2a4f1aa0ae9e6943cd72dd7eebae8a4a (diff) |
changing ConfigCache to return interface{}
Diffstat (limited to 'system/admin/config/config.go')
-rw-r--r-- | system/admin/config/config.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go index 7b57dc0..c83eb32 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -16,6 +16,7 @@ type Config struct { AdminEmail string `json:"admin_email"` ClientSecret string `json:"client_secret"` Etag string `json:"etag"` + DisableCORS []string `json:"cors_disabled"` CacheInvalidate []string `json:"cache"` } @@ -49,7 +50,7 @@ func (c *Config) MarshalEditor() ([]byte, error) { }, editor.Field{ View: editor.Input("AdminEmail", c, map[string]string{ - "label": "Adminstrator Email (will be notified of internal system information)", + "label": "Adminstrator Email (notified of internal system information)", }), }, editor.Field{ @@ -65,7 +66,7 @@ func (c *Config) MarshalEditor() ([]byte, error) { }, editor.Field{ View: editor.Input("Etag", c, map[string]string{ - "label": "Etag Header (used for static asset cache)", + "label": "Etag Header (used to cache resources)", "disabled": "true", }), }, @@ -75,6 +76,13 @@ func (c *Config) MarshalEditor() ([]byte, error) { }), }, editor.Field{ + View: editor.Checkbox("DisableCORS", c, map[string]string{ + "label": "Disable CORS (so only " + c.Domain + " can fetch your data)", + }, map[string]string{ + "true": "Disable", + }), + }, + editor.Field{ View: editor.Checkbox("CacheInvalidate", c, map[string]string{ "label": "Invalidate cache on save", }, map[string]string{ |