Skip to content

Commit 75fda86

Browse files
committed
Add PATCH to CORS allowed methods (fixes #2)
1 parent de36537 commit 75fda86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simplehttp2server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func main() {
8080

8181
server.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
8282
w.Header().Set("Access-Control-Allow-Origin", *cors)
83-
w.Header().Set("Access-Control-Allow-Methods", "GET, OPTION, HEAD, PUT, POST, DELETE")
83+
w.Header().Set("Access-Control-Allow-Methods", "GET, OPTION, HEAD, PATCH, PUT, POST, DELETE")
8484
log.Printf("Request for %s (Accept-Encoding: %s)", r.URL.Path, r.Header.Get("Accept-Encoding"))
8585
defer fs.ServeHTTP(w, r)
8686
if *http1 {

0 commit comments

Comments
 (0)