Commit 9edd8a10 authored by bgrant0607's avatar bgrant0607

Merge pull request #1833 from erictune/authz

Add forbidden error.
parents 641f7209 26a2bab7
...@@ -70,3 +70,9 @@ func badGatewayError(w http.ResponseWriter, req *http.Request) { ...@@ -70,3 +70,9 @@ func badGatewayError(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusBadGateway) w.WriteHeader(http.StatusBadGateway)
fmt.Fprintf(w, "Bad Gateway: %#v", req.RequestURI) 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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment