Log warning if trying to use session cookie with http
If you're trying to use a session cookie and your 1) using http, 2) in dev mode and 3) haven't changed the application config application.session.transferred_over_https_only to false then you may simply not know why your sessions are not working.
I propose we do 1 of 2 things:
-
Log a warning to the console. Nothing like a session not working and you have NO idea why.
-
application.session.transferred_over_https_onlyis false by default only in dev & test modes.
got bitten by this too! solved it by adding this to the POM
...
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<argLine>-Dapplication.session.transferred_over_https_only=false</argLine>
</configuration>
</plugin>
...
</plugins>
</build>
as well as adding (in Eclipse)
-Dapplication.session.transferred_over_https_only=false
to the [VM arguments] in the [Arguments] panel of every Run Configuration i use for individual test classes when [Run As > JUnit Test].