My application server provides HTTP(http://172.18.0.120) service on port 80, which runs behind the reverse proxy server providing HTTPS(https://domain.com) service on port 443. Then the websocket handshake to https://domain.com/websocket failed because the method org. Springframework. Web. CORS. Corsutils. Iscorsrequest() returns true(originUrl.getScheme() returns "https", request.getScheme() returns "http") when using HTTPS reverse proxy server to proxy HTTP service.
Comment From: quaff
There is no logic error here, you should consider ForwardedHeaderFilter .