Subdomains do not keep login session

Notice: This thread is very old.
DestroPlayer
Member | 2
+
0
-

Hello, my website is http://topstreamers.com

I have working authorization there, but when i created subdomains for users' profile I'm not keeping my login session on this part of site. I'm not logged when I go to any subdomain e.g. pooksie.topstreamers.com

What can i change? I have no idea what should I do.

David Grudl
Nette Core | 8227
+
0
-

Enable cookie for all subdomains via config:

nette:
	session:
		cookieDomain: .example.org

With preceding dot!

DestroPlayer
Member | 2
+
0
-

it works! thank you!

I found also another way to resolve this problem. just put to bootstrap.php:

$container->getService('session')->setCookieParameters('/', '.topstreamers.com');

Last edited by DestroPlayer (2014-05-22 18:50)