mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Add forbidden error.
Will be used in subsequent PRs that add authorization.
This commit is contained in:
parent
63e1906902
commit
26a2bab797
@ -70,3 +70,9 @@ func badGatewayError(w http.ResponseWriter, req *http.Request) {
|
||||
w.WriteHeader(http.StatusBadGateway)
|
||||
fmt.Fprintf(w, "Bad Gateway: %#v", req.RequestURI)
|
||||
}
|
||||
|
||||
// forbidden renders a simple forbidden error
|
||||
func forbidden(w http.ResponseWriter, req *http.Request) {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
fmt.Fprintf(w, "Forbidden: %#v", req.RequestURI)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user