# HG changeset patch # User Christian Weiske # Date 1771697588 -3600 # Node ID b00638d74f4611b905811805f48b2911e1b01145 # Parent f45c84d98cde9dceac74ed831c6d82667af289b6 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 diff -r f45c84d98cde -r b00638d74f46 mod_unified_push/mod_unified_push.lua --- 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";