java - Play framework: Why the cookie isn't showing -


i'm trying set simple cookie domain seems doesn't added browser's cookie store.

here's how added cookie

response().setcookie("clientauthtoken", "asdasd", 5000, "/test", "test.com", false, false); 

and if check in cookie manager (a plugin firefox manage cookies) doesn't show cookie added.

if check in session, yes it's there

    (play.mvc.http.cookie cockie: response().cookies()) {         logger.info(" name " + cockie.name());         logger.info(" value " + cockie.value());         logger.info(" domain " + cockie.domain());     } 

this happens if added domain (test.com). if set domain null or empty string , try add cookie again, showing both browser's cookie store , in session. i'm missing here? or not possible add cookie domain.

thanks.

if you're adding cookie domain, can't test when browsing localhost. need in order test edit hosts settings of os (for linux , os x it's /etc/hosts) , add:

127.0.0.1 test.com 

then can test things via http://test.com:9000


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -