Skip to content

Commit

Permalink
gateway: cleanup logic
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Jan 10, 2020
1 parent 5eea0a4 commit 725e684
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,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(w, r)
return
}

if r.Method == http.MethodOptions {
case http.MethodOptions:
i.optionsHandler(w, r)
return
}
Expand Down

0 comments on commit 725e684

Please sign in to comment.