Access Playframework Session in JavaScript

I am using Play 2.0.3 / 2.0.4. I am creating a server side cookie (default name = PLAY_SESSION) and trying to access it in javascript.

I set application.session.httpOnly = false in the application.conf file. However, accessing the cookie in javascript returns null. Looking at cookies in Chrome,

Available for script: None (HttpOnly)

Not sure why cookie is not marked for script access

+1
source share
1 answer

The correct key in the application.conf file to use is session.httpOnly . This key has been added to this commit .

+1
source

Source: https://habr.com/ru/post/1440411/


All Articles