Add X-Real-404 to true 404 responses

This commit is contained in:
Howl 2016-07-12 19:55:58 +02:00
parent 8544c41cc6
commit a999033e4b

View File

@ -12,6 +12,7 @@ type response404 struct {
// Handle404 handles requests with no implemented handlers. // Handle404 handles requests with no implemented handlers.
func Handle404(c *gin.Context) { func Handle404(c *gin.Context) {
c.Header("X-Real-404", "yes")
c.IndentedJSON(404, response404{ c.IndentedJSON(404, response404{
ResponseBase: common.ResponseBase{ ResponseBase: common.ResponseBase{
Code: 404, Code: 404,