diff options
author | Steve <nilslice@gmail.com> | 2016-12-12 00:34:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 00:34:46 -0800 |
commit | e7c23d71d5179744c230ab4e25f405a5607ba905 (patch) | |
tree | 758eba1275e1436220281fd45e3ad642fcda4598 /system/api/handlers.go | |
parent | f39c1519ab382a343c05163f00f38c83bff3583d (diff) | |
parent | 3b10b345045428b9011eecd0ded9c04db42bf28f (diff) |
Merge pull request #20 from bosssauce/ponzu-dev
[core] cache-control & db specifier namespace clean-up
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r-- | system/api/handlers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/api/handlers.go b/system/api/handlers.go index 8a1517b..c238ca9 100644 --- a/system/api/handlers.go +++ b/system/api/handlers.go @@ -200,14 +200,14 @@ func SendJSON(res http.ResponseWriter, j map[string]interface{}) { // CORS wraps a HandleFunc to response to OPTIONS requests properly func CORS(next http.HandlerFunc) http.HandlerFunc { - return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + return db.CacheControl(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { if req.Method == http.MethodOptions { SendPreflight(res) return } next.ServeHTTP(res, req) - }) + })) } // Record wraps a HandleFunc to record API requests for analytical purposes |