From 05c5f95a4060072551f6f9f788f1104172b388a9 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 11 Apr 2018 21:12:53 +0900 Subject: [PATCH] ing --- web/fasthttp/server.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web/fasthttp/server.go b/web/fasthttp/server.go index 9520c37..fcbced6 100644 --- a/web/fasthttp/server.go +++ b/web/fasthttp/server.go @@ -138,15 +138,10 @@ func (s *Server) httpHandler(ctx *fasthttp.RequestCtx) { servlet Servlet ) - if !s.ServerHandler.CheckOrigin(ctx) { - s.onError(ctx, web.NewError(fasthttp.StatusForbidden, fmt.Errorf("Forbidden"))) + if s.ServerHandler.CheckOrigin(ctx) { return } - if string(ctx.Method()) == "OPTIONS" && ctx.Request.Header.Peek("Access-Control-Request-Method") != nil { - ctx.SetStatusCode(fasthttp.StatusOK) - } - if servlet = s.ServerHandler.Servlet(s.ctx, ctx); nil == servlet { s.onError(ctx, web.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found"))) return