diff options
Diffstat (limited to 'system/admin/config/config.go')
-rw-r--r-- | system/admin/config/config.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go index 7b57dc0..0d55700 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -16,6 +16,8 @@ type Config struct { AdminEmail string `json:"admin_email"` ClientSecret string `json:"client_secret"` Etag string `json:"etag"` + DisableCORS bool `json:"cors_disabled"` + DisableGZIP bool `json:"gzip_disabled"` CacheInvalidate []string `json:"cache"` } @@ -49,7 +51,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 +67,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 +77,20 @@ 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 CORS", + }), + }, + editor.Field{ + View: editor.Checkbox("DisableGZIP", c, map[string]string{ + "label": "Disable GZIP (will increase server speed, but also bandwidth)", + }, map[string]string{ + "true": "Disable GZIP", + }), + }, + editor.Field{ View: editor.Checkbox("CacheInvalidate", c, map[string]string{ "label": "Invalidate cache on save", }, map[string]string{ |