Skip to content

webflux logout not working when project defines a context path (spring.webflux.base-path) #11716

@vanwobe

Description

@vanwobe

Describe the bug
GET request to http://localhost:8080/path/logout provides a confirmation page.
After confirming the logout there is a post request to the root path resulting in a 404 error.

To Reproduce
take the hello-security project: https://docs.spring.io/spring-security/reference/reactive/getting-started.html
and add to the application.properties:
spring.webflux.base-path=/path

Expected behavior
after confirming the logout a POST request is expected for:
http://localhost:8080/path/logout
instead we see a POST to:
http://localhost:8080/logout

Sample
https://start.spring.io/starter.zip?type=maven-project&language=java&packaging=jar&jvmVersion=1.8&groupId=example&artifactId=hello-security&name=hello-security&description=Hello%20Security&packageName=example.hello-security&dependencies=webflux,security

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions