From 76b681898d3292f696cc9e184c3240d6c9f4f8f0 Mon Sep 17 00:00:00 2001 From: Takuya Ueda Date: Wed, 28 Nov 2012 10:27:08 +0900 Subject: [PATCH] add OPTIONS as allow method --- jfu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jfu.go b/jfu.go index bcfcd07..370a315 100644 --- a/jfu.go +++ b/jfu.go @@ -123,10 +123,10 @@ func (h *UploadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Add( "Access-Control-Allow-Methods", // "OPTIONS, HEAD, GET, POST, PUT, DELETE", - "GET, POST, PUT, DELETE", + "OPTIONS, GET, POST, PUT, DELETE", ) switch r.Method { - // case "OPTIONS": + case "OPTIONS": // case "HEAD": case "GET": h.get(w, r)