diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-07 00:24:53 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-07 00:24:53 -0700 |
commit | b2e4fd9372f27d3202f07a329a5077b93a4b7390 (patch) | |
tree | 7a00e7753fdf3b4b8f8976e35fb4dd4c564c45a9 /system/admin/config | |
parent | b5f028f0a720f1d23d2ce79d3e885fcb524bb79a (diff) |
adding cache control and etags to responses for static assets + moved handlers/helper upload func
Diffstat (limited to 'system/admin/config')
-rw-r--r-- | system/admin/config/config.go | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go index 791510e..cd27054 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -10,9 +10,11 @@ type Config struct { content.Item editor editor.Editor - Name string `json:"name"` - Domain string `json:"domain"` - ClientSecret string `json:"client_secret"` + Name string `json:"name"` + Domain string `json:"domain"` + ClientSecret string `json:"client_secret"` + Etag string `json:"etag"` + CacheInvalidate []string `json:"-"` } // SetContentID partially implements editor.Editable @@ -51,6 +53,29 @@ func (c *Config) MarshalEditor() ([]byte, error) { "disabled": "true", }), }, + editor.Field{ + View: editor.Input("ClientSecret", c, map[string]string{ + "type": "hidden", + }), + }, + editor.Field{ + View: editor.Input("Etag", c, map[string]string{ + "label": "Etag Header (used for static asset cache)", + "disabled": "true", + }), + }, + editor.Field{ + View: editor.Input("Etag", c, map[string]string{ + "type": "hidden", + }), + }, + editor.Field{ + View: editor.Checkbox("CacheInvalidate", c, map[string]string{ + "label": "Invalidate cache on save", + }, map[string]string{ + "cache": "invalidate", + }), + }, ) if err != nil { return nil, err |