|
hi.
The nginx can proxy https protocal then commit https request to another http server. With the response also.
You must think out server just a http server, your nginx make our server has https(SSL) ablity view from browser.
Our server has two path need to be proxyed. First is the root path, second is websocket path.
You can try to insert below conf code to your nginx https server block.
location jswservice/ {
http://127.0.0.1:8081/
index index.html index.htm;
}
location jswservice/jswapi {
proxy_pass http://127.0.0.1:8081/jswapi;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 45;
proxy_send_timeout 600;
proxy_read_timeout 600;
}
ps: 127.0.0.1:8081 should be replace to our server address
When you call jSW.swInit() to initial jSW lib, you should input "https://xxxxxx/jswservice" as url param.
|
|