Add method HEAD in options response headers

Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
This commit is contained in:
Sun Hongliang 2016-02-26 11:02:18 +08:00
parent 063b63e76a
commit a718e90662
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ var routes = map[string]map[string]handler{
func writeCorsHeaders(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")
w.Header().Add("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept")
w.Header().Add("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT, OPTIONS")
w.Header().Add("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT, OPTIONS, HEAD")
}
func profilerSetup(mainRouter *mux.Router, path string) {