Add forbidden error.

Will be used in subsequent PRs that add authorization.
This commit is contained in:
Eric Tune 2014-10-16 09:25:54 -07:00
parent 63e1906902
commit 26a2bab797

View File

@ -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)
}