chrome devTools port forwarding: how to use session cookie domain?

227 views Asked by At

I am developing a web app using different sub domains and I'd like to go mobile first so I thought using the chrome devTools would be wonderful.

My /etc/hosts file looks like that on my local machine:

127.0.0.51    account.example.local
127.0.0.52    web.example.local

The user need to authenticate on account.example.local and get redirected to web.example.local.

The problem here is that I had to set session_cookie_domain = '.example.local', so they can share the same session. Therefore, when I am using chrome devTools with port forwarding to test on my android device, I can't pass the login page because the device use localhost:5000 and I can't set session_cookie_domain = 'localhost' of course due to cookies specifications.

Question : Did anybody manage to make this kind of settings to work? Or is it simply impossible today ?

Thanks !

1

There are 1 answers

0
Kayce Basques On

You can map to custom local domains, although I'll warn you, it may take some trial and error.