Software /
code /
prosody-modules
Comparison
mod_invites_page/mod_invites_page.lua @ 4116:05d0a249326a
mod_invites_page: Add Link header for URI with rel=alternate
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 14 Sep 2020 12:47:34 +0100 |
parent | 4107:798f284717e7 |
child | 4129:ca099bd28bf5 |
comparison
equal
deleted
inserted
replaced
4115:165ade4ce97b | 4116:05d0a249326a |
---|---|
96 static = base_url.."/static"; | 96 static = base_url.."/static"; |
97 }; | 97 }; |
98 template_vars.apps = render_app_urls(site_apps, template_vars); | 98 template_vars.apps = render_app_urls(site_apps, template_vars); |
99 | 99 |
100 local invite_page = render_html_template(invite_page_template, template_vars); | 100 local invite_page = render_html_template(invite_page_template, template_vars); |
101 | |
102 event.response.headers["Link"] = ([[<%s>; rel="alternate"]]):format(template_vars.uri); | |
101 return invite_page; | 103 return invite_page; |
102 end | 104 end |
103 | 105 |
104 function serve_setup_page(event, app_id) | 106 function serve_setup_page(event, app_id) |
105 local invite_page_template = assert(module:load_resource("html/client.html")):read("*a"); | 107 local invite_page_template = assert(module:load_resource("html/client.html")):read("*a"); |