Spring Boot session is not created in Azure

Adam 196 Reputation points
2021-09-15T16:20:18.247+00:00

When we deploy our Spring Boot app to Azure Web App, the JSESSIONID cookie is not created, and it looks like there is no session at all.

This is our Spring Security session config:

private void setSessionManagement(HttpSecurity http) throws Exception {
        http.sessionManagement()
                .enableSessionUrlRewriting(false)
                .sessionFixation()
                .migrateSession()
                .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
                .invalidSessionStrategy(invalidSessionStrategy);
                //.maximumSessions(1)
                //.expiredSessionStrategy(expiredSessionStrategy);
    }

When we run in locally in Docker/IntelliJ, it is created. Besides this, I have already set the ARR affinity 'On' under the Configuration > General settings, but still no luck.

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
109 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,844 questions
0 comments No comments
{count} votes

Accepted answer
  1. Adam 196 Reputation points
    2021-09-16T07:26:37.16+00:00

    Found the issue, we had to update Spring Boot: 2.3.5.RELEASE -> 2.5.4


0 additional answers

Sort by: Most helpful