mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
15 lines
326 B
Go
15 lines
326 B
Go
|
package handler
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
h "npm/internal/api/http"
|
||
|
)
|
||
|
|
||
|
// NotAllowed is a json error handler for when method is not allowed
|
||
|
func NotAllowed() func(http.ResponseWriter, *http.Request) {
|
||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||
|
h.ResultErrorJSON(w, r, http.StatusNotFound, "Not allowed", nil)
|
||
|
}
|
||
|
}
|