DarthSim 6 年之前
父節點
當前提交
0346b6b45e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server.go

+ 1 - 1
server.go

@@ -96,7 +96,7 @@ func shutdownServer(s *fasthttp.Server) {
 func writeCORS(rctx *fasthttp.RequestCtx) {
 func writeCORS(rctx *fasthttp.RequestCtx) {
 	if len(conf.AllowOrigin) > 0 {
 	if len(conf.AllowOrigin) > 0 {
 		rctx.Response.Header.Set("Access-Control-Allow-Origin", conf.AllowOrigin)
 		rctx.Response.Header.Set("Access-Control-Allow-Origin", conf.AllowOrigin)
-		rctx.Response.Header.Set("Access-Control-Allow-Methods", "GET, OPTIONs")
+		rctx.Response.Header.Set("Access-Control-Allow-Methods", "GET, OPTIONS")
 	}
 	}
 }
 }