https - Cloud foundy spring-boot project encounter redirect loop issue -
all, create spring-boot mvc project, , want limit https visit, configure this.
package com.example; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.enableautoconfiguration; import org.springframework.boot.autoconfigure.springbootapplication; import org.springframework.context.annotation.configuration; import org.springframework.security.config.annotation.web.builders.httpsecurity; import org.springframework.security.config.annotation.web.configuration.websecurityconfigureradapter; @enableautoconfiguration @springbootapplication public class demo123application { public static void main(string[] args) { springapplication.run(demo123application.class, args); } } @configuration class securityconfiguration extends websecurityconfigureradapter { @override protected void configure(httpsecurity http) throws exception { http.requireschannel().anyrequest().requiressecure(); } }
but when visit in chrome, https://web.10.10.132.40.xip.io/ . show redirect loop in screen.
and have configure application.yml below:
server: port: 8443 tomcat: remote_ip_header: x-forwarded-for protocol_header: x-forwarded-proto
can 1 help?
Comments
Post a Comment