summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ninjacloud.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ninjacloud.go b/src/ninjacloud.go
index 984f6a9..326834c 100644
--- a/src/ninjacloud.go
+++ b/src/ninjacloud.go
@@ -290,6 +290,7 @@ func osPath(p string) string {
290//// File APIs 290//// File APIs
291 291
292func fileHandler(w http.ResponseWriter, r *http.Request) { 292func fileHandler(w http.ResponseWriter, r *http.Request) {
293 w.Header().Add("Cache-Control", "no-cache")
293 p := osPath(r.URL.Path[filePathLen:]) 294 p := osPath(r.URL.Path[filePathLen:])
294 if !isInRoot(p) { 295 if !isInRoot(p) {
295 w.WriteHeader(http.StatusForbidden) 296 w.WriteHeader(http.StatusForbidden)
@@ -454,6 +455,7 @@ func fileHandler(w http.ResponseWriter, r *http.Request) {
454//// Directory APIs 455//// Directory APIs
455 456
456func dirHandler(w http.ResponseWriter, r *http.Request) { 457func dirHandler(w http.ResponseWriter, r *http.Request) {
458 w.Header().Add("Cache-Control", "no-cache")
457 p := osPath(r.URL.Path[dirPathLen:]) 459 p := osPath(r.URL.Path[dirPathLen:])
458 if !isInRoot(p) { 460 if !isInRoot(p) {
459 w.WriteHeader(http.StatusForbidden) 461 w.WriteHeader(http.StatusForbidden)
@@ -607,6 +609,7 @@ func getDataHandler(w http.ResponseWriter, r *http.Request) {
607 609
608// Get the cloud status JSON 610// Get the cloud status JSON
609func getStatusHandler(w http.ResponseWriter, r *http.Request) { 611func getStatusHandler(w http.ResponseWriter, r *http.Request) {
612 w.Header().Add("Cache-Control", "no-cache")
610 cloudStatus := map[string]string{ 613 cloudStatus := map[string]string{
611 "name": APP_NAME, 614 "name": APP_NAME,
612 "version": APP_VERSION, 615 "version": APP_VERSION,