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 proxy in port mappings #917

Open
etursunbaev opened this issue Dec 14, 2018 · 9 comments
Open

Websocket proxy in port mappings #917

etursunbaev opened this issue Dec 14, 2018 · 9 comments

Comments

@etursunbaev
Copy link
Contributor

etursunbaev commented Dec 14, 2018

Need to add these nginx directives to templates

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

to websocket proxying
https://www.nginx.com/blog/websocket-nginx/ additional info can be found here

@lbthomsen
Copy link
Contributor

And how will that influence non-websocket connections?

dilshat pushed a commit that referenced this issue Dec 14, 2018
dilshat pushed a commit that referenced this issue Dec 14, 2018
@etursunbaev
Copy link
Contributor Author

        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection $http_connection;

As discussed internally better add these lines to all templates and should not hurt anything

dilshat pushed a commit that referenced this issue Dec 14, 2018
dilshat pushed a commit that referenced this issue Dec 14, 2018
dilshat pushed a commit that referenced this issue Dec 14, 2018
@dilshat dilshat self-assigned this Dec 17, 2018
@dilshat dilshat added this to the 8.1.4 milestone Dec 17, 2018
@dilshat dilshat closed this as completed Dec 19, 2018
@marcoarthur
Copy link

marcoarthur commented Dec 9, 2019

Hello folks, I just hit this issue trying to understand why my deploy to subutai of Convos (http://convos.by/) that depends on WebSockets was failing to keep the connections up. But, these configurations didn't allow me to run it properly I had to add this line on the subutai-nginx configuration created by agent:

 proxy_http_version 1.1

After search for a while (https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version). As I read the docs referred, it states when http proxying the proxy is by default set to http 1.0. And that was the problem I was getting with this application. Thks all. :)

@akarasulu
Copy link
Contributor

akarasulu commented Dec 9, 2019

Good catch @marcoarthur. @etursunbaev was right. Perhaps the fix never made it out the door into production. Reopened to confirm fix.

@akarasulu akarasulu reopened this Dec 9, 2019
dilshat pushed a commit that referenced this issue Dec 10, 2019
#917 added nginx config `proxy_http_version 1.1;`
@dilshat
Copy link
Member

dilshat commented Dec 10, 2019

@marcoarthur hi
I pushed your fix to DEV branch.
You can test with dev peer

@marcoarthur
Copy link

Thanks @dilshat ! Will setup a dev peer and give you feedback ASAP

@marcoarthur
Copy link

@dilshat sorry couldn't really test it yet, without a sandbox env by the moment.

@dilshat
Copy link
Member

dilshat commented Dec 14, 2019

@marcoarthur np , take your time !

@dilshat
Copy link
Member

dilshat commented Jan 14, 2020

@marcoarthur hey buddy
Did you have a chance to test the issue?

@dilshat dilshat mentioned this issue Jan 20, 2020
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

5 participants