Mercurial > prosody-modules
changeset 6411:b00638d74f46
mod_unified_push: Allow additional CORS headers for unified push (fixes #1985)
- Request header "TTL" is mandated by the HTTP Push specification
RFC 8030: https://datatracker.ietf.org/doc/html/rfc8030#section-5
- Firefox sends "Content-Encoding" with a HTTP form submission,
so it is required when using the Unified Push testing tool
at https://unifiedpush.org/test_wp.html
(with the full URL being delivered by the UP-Example Android app)
Adding both headers makes the Unified Push testing tool work from
the browser.
Resolves: https://issues.prosody.im/1985
| author | Christian Weiske <cweiske@cweiske.de> |
|---|---|
| date | Sat, 21 Feb 2026 19:13:08 +0100 |
| parents | f45c84d98cde |
| children | c25b98d42ed0 |
| files | mod_unified_push/mod_unified_push.lua |
| diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_unified_push/mod_unified_push.lua Fri Feb 20 15:09:06 2026 +0000 +++ b/mod_unified_push/mod_unified_push.lua Sat Feb 21 19:13:08 2026 +0100 @@ -198,6 +198,13 @@ module:provides("http", { name = "push"; + cors = { + enabled = true; + headers = { + ["content-encoding"] = true; + ttl = true; + }; + }; route = { ["GET /*"] = function (event) event.response.headers.content_type = "application/json";
