Software /
code /
prosody-modules
Diff
mod_invites_page/mod_invites_page.lua @ 4129:ca099bd28bf5
mod_invites_page, mod_invites_register_web: Set correct Content-Type everywhere necessary
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 15 Sep 2020 14:11:48 +0100 |
parent | 4116:05d0a249326a |
child | 4402:85c11eb4331b |
line wrap: on
line diff
--- a/mod_invites_page/mod_invites_page.lua Tue Sep 15 11:54:48 2020 +0100 +++ b/mod_invites_page/mod_invites_page.lua Tue Sep 15 14:11:48 2020 +0100 @@ -78,6 +78,8 @@ local invite_page_template = assert(module:load_resource("html/invite.html")):read("*a"); local invalid_invite_page_template = assert(module:load_resource("html/invite_invalid.html")):read("*a"); + event.response.headers["Content-Type"] = "text/html; charset=utf-8"; + local invite = invites.get(event.request.url.query); if not invite then return render_html_template(invalid_invite_page_template, { @@ -107,6 +109,8 @@ local invite_page_template = assert(module:load_resource("html/client.html")):read("*a"); local invalid_invite_page_template = assert(module:load_resource("html/invite_invalid.html")):read("*a"); + event.response.headers["Content-Type"] = "text/html; charset=utf-8"; + local invite = invites.get(event.request.url.query); if not invite then return render_html_template(invalid_invite_page_template, {