Skip to content

nginx missing websocket proxy #3361

Open
@sjanssen2

Description

@sjanssen2

location / {
proxy_pass $scheme://mainqiita;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding identity;
}

The provided example nginx configuration seems to not forward websocket HTTP traffic.

W 240215 18:58:08 web:2161] 400 GET /study/list/socket/ (127.0.0.1) 4.57ms
[D 240215 18:58:08 websocket:164] Can "Upgrade" only to "WebSocket".

Should we add a working configuration to this example, such that user do not have to solve this issue by themselves? Btw. I am not sure what the matching configuration would look like, can we follow: https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-configure-nginx-for-websockets/ ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions