Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Cloud Gateway listen to both HTTP and HTTPS?

How can I configure a Spring Cloud Gateway server to accept both HTTP and HTTPS connections?

I have SSL configured to port 443 on the Gateway server. I also want to accept HTTP requests on port 80. I know how to do this with a standard Spring Boot application running Tomcat, but I need to know how to configure the Netty server that Gateway uses.

like image 357
chad Avatar asked Sep 13 '26 16:09

chad


1 Answers

So apparently spring cloud gateway uses webflux which does not directly support it, but there are some ways: How to configure in Spring Boot 2 (w/ WebFlux) two ports for HTTP and HTTPS?

Also waiting for a real solution: https://github.com/spring-projects/spring-boot/issues/12035

like image 137
maslan Avatar answered Sep 15 '26 14:09

maslan