summaryrefslogtreecommitdiff
path: root/system/db
diff options
context:
space:
mode:
Diffstat (limited to 'system/db')
-rw-r--r--system/db/cache.go2
-rw-r--r--system/db/config.go2
-rw-r--r--system/db/init.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/system/db/cache.go b/system/db/cache.go
index 30ecf5a..0120147 100644
--- a/system/db/cache.go
+++ b/system/db/cache.go
@@ -11,7 +11,7 @@ import (
// CacheControl sets the default cache policy on static asset responses
func CacheControl(next http.Handler) http.HandlerFunc {
return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
- etag := ConfigCache("etag")
+ etag := ConfigCache("etag").(string)
policy := fmt.Sprintf("max-age=%d, public", 60*60*24*30)
res.Header().Add("ETag", etag)
res.Header().Add("Cache-Control", policy)
diff --git a/system/db/config.go b/system/db/config.go
index 45b3952..f1d1215 100644
--- a/system/db/config.go
+++ b/system/db/config.go
@@ -166,6 +166,6 @@ func PutConfig(key string, value interface{}) error {
// ConfigCache is a in-memory cache of the Configs for quicker lookups
// 'key' is the JSON tag associated with the config field
-func ConfigCache(key string) string {
+func ConfigCache(key string) interface{} {
return configCache.Get(key)
}
diff --git a/system/db/init.go b/system/db/init.go
index eaf6d76..98ba056 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -71,7 +71,7 @@ func Init() {
}
}
- clientSecret := ConfigCache("client_secret")
+ clientSecret := ConfigCache("client_secret").(string)
if clientSecret != "" {
jwt.Secret([]byte(clientSecret))