summaryrefslogtreecommitdiff
path: root/system/api/handlers.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-07 09:32:46 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-07 09:32:46 -0800
commita20025b452934069fc6c39949d7b9e123a503c9c (patch)
tree871cb4c11c5dcb2ad1f870f88569fc3b51978201 /system/api/handlers.go
parentfee285453459ac33f53dc66052bffa7a83aca778 (diff)
testing cache control exec from CORS
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r--system/api/handlers.go4
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