ejabberd - Comments for "mod_http_bind + ejabbered 2.1.5 + CentOS 5.5 x86_64" https://www.ejabberd.im/node/4356 en jowy wrote: Is it possible to https://www.ejabberd.im/node/4356#comment-56746 <div class="quote-msg"><div class="quote-author"><em>jowy</em> wrote:</div> Is it possible to send out customized headers with the response of the http-bind? </div> Yes, it's possible to tweak ejabberd source code to provide additional headers. <div class="quote-msg"><div class="quote-author"><em>jowy</em> wrote:</div> I need to set the Access-Control-Allow-Origin header. Any ideas to get around this or how to set the header to allow my origin? </div> mod_http_bind returns that header since ejabberd 2.1.3, related to the ticket https://support.process-one.net/browse/EJAB-1168 See this example request and response using ejabberd 2.1.5: <pre> 127.000.000.001.40649-127.000.000.001.05280: POST /http-bind// HTTP/1.1 Host: localhost:5280 User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.13) Gecko/20100916 Iceweasel/3.5.13 (like Firefox/3.5.13) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: es,es-es;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Content-Type: text/xml; charset=utf-8 Content-Length: 352 Pragma: no-cache Cache-Control: no-cache &lt;body rid='133525' sid='c853b73bc991f42f25288245e66a2109ad719295' xmlns='http://jabber.org/protocol/httpbind' key='bcd6e31d4933e19cbf13b9332c905e2f26ea26c9'> &lt;presence xmlns="jabber:client"> &lt;priority>5&lt;/priority> &lt;c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://oneteam.im/caps" ver="B+1NRmfWP0dRroiutKItQnRwX78=" /> &lt;/presence> &lt;/body> 127.000.000.001.05280-127.000.000.001.40649: HTTP/1.1 200 OK Content-Length: 306 Content-Type: text/xml; charset=utf-8 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Content-Type &lt;body xmlns='http://jabber.org/protocol/httpbind'> &lt;presence xmlns='jabber:client' from='badlop@localhost/OneTeam' to='badlop@localhost/OneTeam'> &lt;priority>5&lt;/priority> &lt;c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://oneteam.im/caps' ver='B+1NRmfWP0dRroiutKItQnRwX78=' /> &lt;/presence> &lt;/body> </pre> Mon, 18 Oct 2010 10:46:20 +0000 mfoss comment 56746 at https://www.ejabberd.im