summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2012-09-25 22:10:45 +0200
committerPacien2015-12-07 22:48:27 +0100
commitdb0e7ed7df5e0f6e4146892a3ac2be9425324076 (patch)
tree818a44396447e9ebf2e989d775066c612db7be12
parent2ba379a218dcef842b5b46b10d12130757a6dc3f (diff)
downloadninja-go-local-cloud-db0e7ed7df5e0f6e4146892a3ac2be9425324076.tar.gz
Add headers to the status handler.HEADmaster
-rw-r--r--src/ninjacloud.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ninjacloud.go b/src/ninjacloud.go
index f2d31d7..25a84a4 100644
--- a/src/ninjacloud.go
+++ b/src/ninjacloud.go
@@ -632,6 +632,11 @@ func getDataHandler(w http.ResponseWriter, r *http.Request) {
632 632
633// Get the cloud status JSON 633// Get the cloud status JSON
634func getStatusHandler(w http.ResponseWriter, r *http.Request) { 634func getStatusHandler(w http.ResponseWriter, r *http.Request) {
635 w.Header().Add("Cache-Control", "no-cache")
636 w.Header().Add("Access-Control-Allow-Headers", "Content-Type, sourceURI, overwrite-destination, check-existence-only, recursive, return-type, operation, delete-source, file-filters, if-modified-since, get-file-info")
637 w.Header().Add("Access-Control-Allow-Methods", "POST, GET, DELETE, PUT")
638 w.Header().Add("Access-Control-Allow-Origin", "*/*")
639 w.Header().Add("Access-Control-Max-Age", "86400")
635 cloudStatus := map[string]string{ 640 cloudStatus := map[string]string{
636 "name": APP_NAME, 641 "name": APP_NAME,
637 "version": APP_VERSION, 642 "version": APP_VERSION,