Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket support for another port than default (with fix) #586

Open
Hanarion opened this issue Aug 29, 2020 · 3 comments
Open

Websocket support for another port than default (with fix) #586

Hanarion opened this issue Aug 29, 2020 · 3 comments

Comments

@Hanarion
Copy link

Describe the bug

  • When the port used for reverse proxy is not 443 or 80 websockets doesnt works

To Reproduce
Steps to reproduce the behavior:

  1. Map another port that 443 or 80 on the host side to the docker container
  2. try to connect to a websocket
  3. you'll get a 403 error

Expected behavior
Working websocket

Solution
Change code of include/proxy.conf to :

add_header       X-Served-By $http_host;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto  $scheme;
proxy_set_header X-Forwarded-For    $remote_addr;
proxy_pass       $forward_scheme://$server:$port;

$host is changed to $http_host in order to fix that problem

@Hanarion Hanarion added the bug label Aug 29, 2020
@luastoned
Copy link

I think this issue is still ongoing?

@thorsten-gehrig
Copy link

I´m also looking forward to have a fix for this. My Websocket is on port 8080....

Copy link

Issue is now considered stale. If you want to keep it open, please comment 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants