- redirectToHttps
https://docs.spring.io/spring-security/site/docs/5.1.3.RELEASE/reference/html/webflux-redirect-https.html
18. Redirect to HTTPS
HTTPS is required to provide a secure application. Spring Security can be configured to perform a redirect to https using the following Java Configuration: @Bean SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { http .redirectToHt
docs.spring.io
- portMapper
http
.portMapper()
.http(8080).mapsTo(8443);
http://www.rmarcello.it/spring-security-aumomatic-redirect-on-https/
Spring Security: Aumomatic redirect on HTTPS – Raffaele Marcello
In this article I want to show how to configure Spring Security (3+) to redirect all HTTP request from port of 8080 to HTTPS port 8443. Using Spring security the developer can do it writing only three rows. Isn’t incredible? package it.rmarcello.myserver
www.rmarcello.it