jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Send the original Host #88

Closed JordyLangen closed 10 years ago

JordyLangen commented 10 years ago

Hi,

Would it be possible to send the original host in another header? I gave the master.coffee file a look and I think it's possible. I would have tried it myself but my coffeescript knowledge is very small and I have no experience in it.

jpillora commented 10 years ago

This has been brought up before, see https://github.com/jpillora/xdomain/issues/47#issuecomment-36507133. Basically, just add the master href into the slave iframe url, then requests from the slave will set a referrer header with the master in the url.