webssh
webssh copied to clipboard
Cross origin operation is not allowed.
When I try to click connect I get Cross origin operation is not allowed.
in div.status
? My server is set up not to allow cross origin scripts… I'm accessing the page through an NGINX proxy at https://ssh.example.com
, as http://example.com:8888
doesn't load (prob due to something not working with my Cloudflare setup but also because I have HSTS set up so it has to be SSL).
Any thoughts? Maybe we need to rewrite the URL it's asking for the scripts from?
Hello, I met the same problem with you. Have you solved the problem?
Same error here.
I think this is a nginx problem:
The first time I used an almost empty config and that worked.
Now I want to set it up on location /ssh/
of my server. Could that be related ?
I found the config that worked for me with nginx:
server {
listen 80;
location /ssh/ {
proxy_pass http://localhost:8888/;
proxy_set_header Host $http_host;
proxy_read_timeout 300;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
}
}
For wssh to work with a reverse proxy, make sure the adress is /ssh/
and the proxy_pass is http://
localhost:8888/` : all the slashes are important here.
Then, make sure you use add the header proxy_set_header Host $http_host
to indicate the right host adress to wssh.
Maybe the X-forwarded-for header could work here, I didn't test it.
I hope this can be usefull to somebody !