diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-13 11:58:39 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-13 11:58:39 -0800 |
commit | 59ee9fbb237673c2d0cccad42f7adbae65852b8d (patch) | |
tree | 3326e7c43eef2483fff5e24b7e2f840fb94b4d38 /system/admin/server.go | |
parent | 3249b82b2a4f1aa0ae9e6943cd72dd7eebae8a4a (diff) |
changing ConfigCache to return interface{}
Diffstat (limited to 'system/admin/server.go')
-rw-r--r-- | system/admin/server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/system/admin/server.go b/system/admin/server.go index f2bf244..991f2d2 100644 --- a/system/admin/server.go +++ b/system/admin/server.go @@ -51,5 +51,7 @@ func Run() { // even if the API server is not running. Otherwise, images/files uploaded // through the editor will not load within the admin system. uploadsDir := filepath.Join(pwd, "uploads") - http.Handle("/api/uploads/", api.Record(db.CacheControl(http.StripPrefix("/api/uploads/", http.FileServer(restrict(http.Dir(uploadsDir))))))) + http.Handle("/api/uploads/", api.Record(api.CORS(db.CacheControl( + http.StripPrefix("/api/uploads/", http.FileServer( + restrict(http.Dir(uploadsDir)))))))) } |