aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-09 22:06:58 +0200
committerKim Alvefur <zash@zash.se>2021-07-09 22:06:58 +0200
commit4439ef50e44a71cbd566bf5a127018d76d5b1ffa (patch)
tree9ff0f522a7769b97889ea46189c409b1cbf0d469
parentb24d7fe90d99076d104dd255383f94d052eb4898 (diff)
downloadprosody-4439ef50e44a71cbd566bf5a127018d76d5b1ffa.tar.gz
prosody-4439ef50e44a71cbd566bf5a127018d76d5b1ffa.zip
mod_http_errors: Set status code 200 from root page
It isn't quite an error.
-rw-r--r--plugins/mod_http_errors.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_http_errors.lua b/plugins/mod_http_errors.lua
index b5d0f7fb..8b1db4b7 100644
--- a/plugins/mod_http_errors.lua
+++ b/plugins/mod_http_errors.lua
@@ -98,6 +98,7 @@ local icon = [[
module:hook_object_event(server, "http-error", function (event)
local request, response = event.request, event.response;
if request and response and request.path == "/" and response.status_code == 404 then
+ response.status_code = 200;
response.headers.content_type = "text/html; charset=utf-8";
local message = messages["/"];
return render(html, {