send a HTTP 404 code instead of 200, on 404 pages

This commit is contained in:
Miguel Jacq 2017-11-09 17:51:34 +11:00
parent 4387589b4f
commit bb46c2de99
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6

View file

@ -331,7 +331,7 @@ def page_not_found(e):
force_shutdown()
print(strings._('error_rate_limit'))
r = make_response(render_template_string(open(common.get_resource_path('html/404.html')).read()))
r = make_response(render_template_string(open(common.get_resource_path('html/404.html')).read()), 404)
for header,value in security_headers:
r.headers.set(header, value)
return r