How to password protect multiple sub domain but single login


I’m new to haproxy,

I have managed to set up a password protected access (for development platform) but my application is making ajax call to other subdomain of the same domain (for example ->
But those calls are rejected due to the previous rule. How could I managed to login on one subdomain, for all other subdomain ? or is it possible to not ask for password if the request comes from a browser app loaded from another domain ?

I’m not sure my question is please, please ask if you need more information.

Thanks a lot.