Use library const for HTTP verbs
This commit is contained in:
parent
68305df9b2
commit
f4d197485c
2 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ func (h *Headscale) DERPProbeHandler(
|
|||
req *http.Request,
|
||||
) {
|
||||
switch req.Method {
|
||||
case "HEAD", "GET":
|
||||
case http.MethodHead, http.MethodGet:
|
||||
writer.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
writer.WriteHeader(http.StatusOK)
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue