core/corehttp: Return 403 for blocked requests instead of 404
Matt Bell committed
Feb 4, 2015 at 18:43 UTC
2d173c3a257b1a90c7104b677661bb3727adbf89
1 file changed
+2
-1
core/corehttp/gateway_handler.go
+2
-1
@@ -167,7 +167,8 @@ func (i *gatewayHandler) getHandler(w http.ResponseWriter, r *http.Request) {
167
urlPath := r.URL.Path
168
169
if i.config.BlockList != nil && i.config.BlockList.ShouldBlock(urlPath) {
170
- w.WriteHeader(http.StatusNotFound)
170
+ w.WriteHeader(http.StatusForbidden)
171
+ w.Write([]byte("403 - Forbidden"))
172
return
173
}
174