1
votes
  • Play Version (2.3.x)
  • API Java
  • JDK (Oracle 1.8.0_111)

The property application.context (changed to play.http.context in 2.4.x) is used for: 1. Setting the cookie path (as I can see in Http.Session.CookieBaker). 2. Setting the prefix for the routes files like explained in this thread.

I don't know why the same property is reused in both cases.

There might be cases when we want different modules with different prefix and they are running under the same domain (or subdomain) so we don't want to limit the cookie to some specific path. From my understanding, route prefixes do not need to be always related with cookies path.

There is a way I can intercept the response and change this path cookie parameter or that I can extend the cookie builder? Any other suggestion?