mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02:00
refactor: remove forward auth, move module net/http to net/gphttp
This commit is contained in:
20
internal/net/gphttp/methods.go
Normal file
20
internal/net/gphttp/methods.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package gphttp
|
||||
|
||||
import "net/http"
|
||||
|
||||
func IsMethodValid(method string) bool {
|
||||
switch method {
|
||||
case http.MethodGet,
|
||||
http.MethodHead,
|
||||
http.MethodPost,
|
||||
http.MethodPut,
|
||||
http.MethodPatch,
|
||||
http.MethodDelete,
|
||||
http.MethodConnect,
|
||||
http.MethodOptions,
|
||||
http.MethodTrace:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user