[GH-ISSUE #254] Handle wss in X-Forwarded-Proto #142

Closed
opened 2026-02-26 09:36:55 +03:00 by kerem · 6 comments
Owner

Originally created by @jcgruenhage on GitHub (May 29, 2020).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/254

Do you want to request a feature or report a bug? Bug

What is the current behavior? Trying to open a document using the document server when using traefik as a reverse proxy fails, because the X-Forwarded-Proto header is set to wss, which the DocumentServer does not handle correctly. As a workaround, overriding the header in traefik works, but that's annoying and lots of people run into this, ending up quite confused (source: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/151)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  • setup traefik
  • setup nextcloud
  • setup document server
  • open document
    image

What is the expected behavior?
Being able to open the document for editing.

Did this work in previous versions of DocumentServer?
Not sure, probably not.

DocumentServer Docker tag:
5.5

Host Operating System:
VoidLinux (why does this matter?)

Originally created by @jcgruenhage on GitHub (May 29, 2020). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/254 **Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** Trying to open a document using the document server when using traefik as a reverse proxy fails, because the `X-Forwarded-Proto` header is set to `wss`, which the DocumentServer does not handle correctly. As a workaround, overriding the header in traefik works, but that's annoying and lots of people run into this, ending up quite confused (source: https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/151) **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** - setup traefik - setup nextcloud - setup document server - open document ![image](https://user-images.githubusercontent.com/6861958/83277379-415c6600-a1d2-11ea-9d3c-adaf7b7f2b63.png) **What is the expected behavior?** Being able to open the document for editing. **Did this work in previous versions of DocumentServer?** Not sure, probably not. **DocumentServer Docker tag:** 5.5 **Host Operating System:** VoidLinux (why does this matter?)
kerem 2026-02-26 09:36:55 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@agolybev commented on GitHub (May 29, 2020):

Hi @jcgruenhage, DS waits http or https as X-Forwarded-Proto header value. Please checkout traefik example config for DS here.

<!-- gh-comment-id:636047943 --> @agolybev commented on GitHub (May 29, 2020): Hi @jcgruenhage, DS waits `http` or `https` as `X-Forwarded-Proto` header value. Please checkout traefik example config for DS [here](https://github.com/ONLYOFFICE/document-server-proxy/blob/master/traefik/proxy-https-to-http.toml).
Author
Owner

@SuperSandro2000 commented on GitHub (May 29, 2020):

The Traefik example is for Traefik 1.0. This issue only occurs with Traefik 2.0.

<!-- gh-comment-id:636066358 --> @SuperSandro2000 commented on GitHub (May 29, 2020): The Traefik example is for Traefik 1.0. This issue only occurs with Traefik 2.0.
Author
Owner

@jcgruenhage commented on GitHub (May 29, 2020):

Even if you update the sample config to work with traefik 2.0, this is not something that should require any special config. Requiring http(s) as X-Forwarded-Proto when the actual protocol is ws(s) is a bug, overriding traefiks behaviour is a workaround that hides the bug, not a fix or a solution.

<!-- gh-comment-id:636071235 --> @jcgruenhage commented on GitHub (May 29, 2020): Even if you update the sample config to work with traefik 2.0, this is not something that should require any special config. Requiring http(s) as X-Forwarded-Proto when the actual protocol is ws(s) is a bug, overriding traefiks behaviour is a workaround that hides the bug, not a fix or a solution.
Author
Owner

@zilexa commented on GitHub (Jan 9, 2021):

Is there an update or workaround available to get this working with Traefikv2.0?
edit: I found a solution and posted it here https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/151#issuecomment-757392562

<!-- gh-comment-id:757384328 --> @zilexa commented on GitHub (Jan 9, 2021): Is there an update or workaround available to get this working with Traefikv2.0? edit: I found a solution and posted it here https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/151#issuecomment-757392562
Author
Owner

@deefdragon commented on GitHub (Aug 8, 2021):

I also am encountering this, and the solutions posted have not solved it for me. I have confirmed the headers via curl, and disabled cache via chrome-tools. No dice.

<!-- gh-comment-id:894743219 --> @deefdragon commented on GitHub (Aug 8, 2021): I also am encountering this, and the solutions posted have not solved it for me. I have confirmed the headers via curl, and disabled cache via chrome-tools. No dice.
Author
Owner

@igwyd commented on GitHub (Nov 12, 2024):

Hello, sorry for the late reply,
Duplicate of https://github.com/ONLYOFFICE/DocumentServer/issues/2162

<!-- gh-comment-id:2469763986 --> @igwyd commented on GitHub (Nov 12, 2024): Hello, sorry for the late reply, Duplicate of https://github.com/ONLYOFFICE/DocumentServer/issues/2162
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#142
No description provided.