▲ | anonfordays 4 days ago | ||||||||||||||||||||||
Just use subdomains such as *.dev.example.com, *.test.example.com, *.prod.example.com, etc., no? | |||||||||||||||||||||||
▲ | mcfedr 4 days ago | parent | next [-] | ||||||||||||||||||||||
The reason not to do that is that dev.example.com can set cookies on example.com and other envs can see them. | |||||||||||||||||||||||
▲ | thayne 4 days ago | parent | prev | next [-] | ||||||||||||||||||||||
That only works if you (and any third party code that might run on such a domain) are completely consistent about always specifying the domain as one of your subdomains whenever you set a cookie. And if your marketing/SEO/business people are ok with having something like "prod" as a subdomain for all your production web pages. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | jan_g 4 days ago | parent | prev | next [-] | ||||||||||||||||||||||
We have *.example.dev, *.example.qa, *.example.com for development, staging/qa and production. Works well and we haven't had any issues with cookies. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | teaearlgraycold 4 days ago | parent | prev [-] | ||||||||||||||||||||||
Ah yes if you use a CNAME that would work. You know better than me. |