Software /
code /
prosody-modules
Diff
mod_pubsub_eventsource/mod_pubsub_eventsource.lua @ 1241:2380a5d71448
mod_pubsub_eventsource: Add CORS headers for cross-domain support
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 02 Dec 2013 03:06:10 +0000 |
parent | 858:28dba9608499 |
child | 1242:4d1226220e58 |
line wrap: on
line diff
--- a/mod_pubsub_eventsource/mod_pubsub_eventsource.lua Sun Dec 01 19:12:08 2013 +0000 +++ b/mod_pubsub_eventsource/mod_pubsub_eventsource.lua Mon Dec 02 03:06:10 2013 +0000 @@ -24,6 +24,9 @@ response.conn:write(table.concat({ "HTTP/1.1 200 OK"; "Content-Type: text/event-stream"; + "Access-Control-Allow-Origin: *"; + "Access-Control-Allow-Methods: GET"; + "Access-Control-Max-Age: 7200"; ""; ""; }, "\r\n"));