提交 09c56efa 作者: Steven Allen

gateway: cleanup logic

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 16a44ccf
......@@ -88,12 +88,11 @@ func (i *gatewayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
if r.Method == http.MethodGet || r.Method == http.MethodHead {
switch r.Method {
case http.MethodGet, http.MethodHead:
i.getOrHeadHandler(ctx, w, r)
return
}
if r.Method == http.MethodOptions {
case http.MethodOptions:
i.optionsHandler(w, r)
return
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论