Hello,
I run a website with multiple domain names served from the same IP address. Some of my users report having issues and gathering all the information about them it turns out they are all using Mikrotik routers.
The website runs at mydomain.com and then at some point of time redirects user to subdomain.mydomain.com. Website uses websockets and xhr-polling and jsonp-polling, so all connections are keep-alive without Connection Close header. Since both mydomain.com and subdomain.mydomain.com are on the same IP address and same port, Mikrotik decides to reuse the http connection.
However, this poses a problem, because on my end, connections are routed through HAProxy to completely different servers based on the hostname. HAProxy only checks this at initial communication. So requests that should be sent to subdomain.mydomain.com end up at server serving mydomain.com which does something completely different, and users get the error.
Is there some way to tell Mikrotik do defer from this behavior? I do not have control over user systems, and most probably they don't either as those are ISP's Mikrotiks probably. I'm looking for some HTTP headers that I could send which would force Mikrotik to start a new connection when a different hostname in encountered?
Thanks.