Referring first to nginx configuration and force https http to https automatically jump to configure the nginx https certificate.
Then add the following properties in application.properties:
server.tomcat.remote_ip_header=x-forwarded-for server.tomcat.protocol_header=x-forwarded-proto server.tomcat.port-header=X-Forwarded-Port server.use-forward-headers=true
Other eliminates the need for special handling it, websocket also without special treatment.