Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 10728:2764beb552cd
mod_bosh, mod_websocket: Add config options to override GET responses
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 20 Apr 2020 11:30:59 +0100 |
parent | 10377:4c36bc28b99e |
child | 11125:5bcddab1659b |
comparison
equal
deleted
inserted
replaced
10727:fa2a89132dfb | 10728:2764beb552cd |
---|---|
509 else | 509 else |
510 session:close({ condition = "bad-format", text = "Error processing stream" }); | 510 session:close({ condition = "bad-format", text = "Error processing stream" }); |
511 end | 511 end |
512 end | 512 end |
513 | 513 |
514 local GET_response_body = [[<html><body> | |
515 <p>It works! Now point your BOSH client to this URL to connect to Prosody.</p> | |
516 <p>For more information see <a href="https://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p> | |
517 </body></html>]]; | |
518 | |
514 local GET_response = { | 519 local GET_response = { |
515 headers = { | 520 headers = { |
516 content_type = "text/html"; | 521 content_type = "text/html"; |
517 }; | 522 }; |
518 body = [[<html><body> | 523 body = module:get_option_string("bosh_get_response_body", GET_response_body); |
519 <p>It works! Now point your BOSH client to this URL to connect to Prosody.</p> | |
520 <p>For more information see <a href="https://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p> | |
521 </body></html>]]; | |
522 }; | 524 }; |
523 | 525 |
524 module:depends("http"); | 526 module:depends("http"); |
525 module:provides("http", { | 527 module:provides("http", { |
526 default_path = "/http-bind"; | 528 default_path = "/http-bind"; |