Welcome! Log In Create A New Profile


reverse proxy issue with websocket

Posted by alturismo 
reverse proxy issue with websocket
July 05, 2019 02:49PM

i tried a little longer now with one of my services behind my reverse proxy and im out of ideas meanwhile.

i use several subdomains and subfolder configs wich are all working nice exept this one special service, may here someone has an idea.

Following error i see in the chrome dev console when i try to access the site behind the proxy.

Uncaught DOMException: Failed to construct 'WebSocket': The "https://web.meinedomain.de/web/js/network_ts.js" (wird angezeigt als Link network_ts.js:17) URL's scheme must be either 'ws' or 'wss'. 'undefinedweb.meinedomain.de' is not allowed.
at Server.request (https://web.meinedomain.de/web/js/network_ts.js:17:18)
at PageReady (https://web.meinedomain.de/web/js/menu_ts.js:671:12)
at onload (https://web.meinedomain.de/web/:20:57)

i ve tried severall suggestions while using google, ending always in the same trap ...

The service is called, always ends in a endless spinner (loading) splash ...

as sample my actual current last config, may someone has an idea what to try ... or is it like this that some services are just not capable to be served behind a reverse proxy without rewriting them.

For any hints, thanks ahead.

server {
listen 443 ssl;

# root /config/www;
# index index.html index.htm index.php;

server_name web.*;

ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
ssl_dhparam /config/nginx/dhparams.pem;
ssl_ciphers 'ECD........
ssl_prefer_server_ciphers on;

location / {
include /config/nginx/proxy.conf;
resolver valid=30s;
set $upstream_xteve;
proxy_pass http://$upstream_xteve:34400;

location /api/websocket {
resolver valid=30s;
set $upstream_xteve;
proxy_pass http://$upstream_xteve:34400;
proxy_set_header Host $host;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready