[GH-ISSUE #785] Failed Download with Editor.bin #361

Closed
opened 2026-02-26 10:32:08 +03:00 by kerem · 11 comments
Owner

Originally created by @Prosfinity on GitHub (Jan 9, 2025).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/785

Originally assigned to: @igwyd on GitHub.

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

What is the current behavior?
Failed download when open the doc
http://onlyoffice.xxxxxxx.com/cache/files/data/373111xxxx/Editor.bin/Editor.bin?md5=oiramSALh-xxxxbZoFv2Q&expires=xxxx03334&shardkey=373111xxxx9&filename=Editor.bin
The docker is using nginx for communication, but nextcloud server always request http instead of https.
Referrer Policy:
strict-origin-when-cross-origin
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Request https with onlyoffice server.
Open the file on nextcloud and get failed download
What is the expected behavior?
Expected no error prompt
Did this work in previous versions of DocumentServer?
NA
DocumentServer Docker tag:
8.2.2.22
Host Operating System:
Docker

image
image

Originally created by @Prosfinity on GitHub (Jan 9, 2025). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/785 Originally assigned to: @igwyd on GitHub. **Do you want to request a *feature* or report a *bug*?** No **What is the current behavior?** Failed download when open the doc http://onlyoffice.xxxxxxx.com/cache/files/data/373111xxxx/Editor.bin/Editor.bin?md5=oiramSALh-xxxxbZoFv2Q&expires=xxxx03334&shardkey=373111xxxx9&filename=Editor.bin The docker is using nginx for communication, but nextcloud server always request http instead of https. Referrer Policy: strict-origin-when-cross-origin **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** Request https with onlyoffice server. Open the file on nextcloud and get failed download **What is the expected behavior?** Expected no error prompt **Did this work in previous versions of DocumentServer?** NA **DocumentServer Docker tag:** 8.2.2.22 **Host Operating System:** Docker ![image](https://github.com/user-attachments/assets/7e832c12-b6e2-4ad3-b088-478cadd9a1b5) ![image](https://github.com/user-attachments/assets/39624348-92a3-4b6e-a660-37accb6c1d39)
kerem closed this issue 2026-02-26 10:32:08 +03:00
Author
Owner

@igwyd commented on GitHub (Jan 14, 2025):

Hello @Prosfinity, how did you swich http to https on the onlyoffice documentserver? Describe your installation more detail.

<!-- gh-comment-id:2588985954 --> @igwyd commented on GitHub (Jan 14, 2025): Hello @Prosfinity, how did you swich http to https on the onlyoffice documentserver? Describe your installation more detail.
Author
Owner

@liuxiawei commented on GitHub (Jan 24, 2025):

Same error. Docker install with lasted version.
In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with https but hte Editor.bin is fetch with http and it has been blocked. I tried to edit as description in https://github.com/ONLYOFFICE/DocumentServer/issues/2186 . but not work with new version.
Link with https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764
https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669

<!-- gh-comment-id:2611663484 --> @liuxiawei commented on GitHub (Jan 24, 2025): Same error. Docker install with lasted version. In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with `https` but hte `Editor.bin` is fetch with `http` and it has been blocked. I tried to edit as description in https://github.com/ONLYOFFICE/DocumentServer/issues/2186 . but not work with new version. Link with https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764 https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669
Author
Owner

@Prosfinity commented on GitHub (Jan 24, 2025):

Same error. Docker install with lasted version.
In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with https but hte Editor.bin is fetch with http and it has been blocked. I tried to edit as description in https://github.com/ONLYOFFICE/DocumentServer/issues/2186 . but not work with new version.
Link with https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764
https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669

I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key

<!-- gh-comment-id:2612249574 --> @Prosfinity commented on GitHub (Jan 24, 2025): > Same error. Docker install with lasted version. > In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with `https` but hte `Editor.bin` is fetch with `http` and it has been blocked. I tried to edit as description in https://github.com/ONLYOFFICE/DocumentServer/issues/2186 . but not work with new version. > Link with https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764 > https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669 > I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key
Author
Owner

@liuxiawei commented on GitHub (Jan 24, 2025):

Same error. Docker install with lasted version.
In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with https but hte Editor.bin is fetch with http and it has been blocked. I tried to edit as description in ONLYOFFICE/DocumentServer#2186 . but not work with new version.
Link with #764
#669

I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key

Thanks for sharing. But for my situation I just could use https with revese proxy. I also found oneway, specific X-Forwarded-Proto to https in nginx.

Image

<!-- gh-comment-id:2612321017 --> @liuxiawei commented on GitHub (Jan 24, 2025): > > Same error. Docker install with lasted version. > > In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with `https` but hte `Editor.bin` is fetch with `http` and it has been blocked. I tried to edit as description in [ONLYOFFICE/DocumentServer#2186](https://github.com/ONLYOFFICE/DocumentServer/issues/2186) . but not work with new version. > > Link with [#764](https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764) > > [#669](https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669) > > I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key Thanks for sharing. But for my situation I just could use https with revese proxy. I also found oneway, specific `X-Forwarded-Proto` to https in nginx. ![Image](https://github.com/user-attachments/assets/7a8158ba-4a09-4f74-b755-01099183e167)
Author
Owner

@Nathan9745354 commented on GitHub (Jan 24, 2025):

Hello @Prosfinity, how did you swich http to https on the onlyoffice documentserver? Describe your installation more detail.

It's nginx proxy to handle http redirect https, suppose it onlyoffice will try to communicate with http then https?
but it's struck with http becase proxy didn't redirect or try https will proxy.

<!-- gh-comment-id:2612782490 --> @Nathan9745354 commented on GitHub (Jan 24, 2025): > Hello [@Prosfinity](https://github.com/Prosfinity), how did you swich http to https on the onlyoffice documentserver? Describe your installation more detail. It's nginx proxy to handle http redirect https, suppose it onlyoffice will try to communicate with http then https? but it's struck with http becase proxy didn't redirect or try https will proxy.
Author
Owner

@Nathan9745354 commented on GitHub (Jan 24, 2025):

Same error. Docker install with lasted version.
In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with https but hte Editor.bin is fetch with http and it has been blocked. I tried to edit as description in ONLYOFFICE/DocumentServer#2186 . but not work with new version.
Link with #764
#669

I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key

Thanks for sharing. But for my situation I just could use https with revese proxy. I also found oneway, specific X-Forwarded-Proto to https in nginx.

Image

Hi ,

Does it work for you?

<!-- gh-comment-id:2612784478 --> @Nathan9745354 commented on GitHub (Jan 24, 2025): > > > Same error. Docker install with lasted version. > > > In my situation. The 80 prot is blocked and cannot redirect to https. And I intergrated it with seafile. Till now all js is right and fetch with `https` but hte `Editor.bin` is fetch with `http` and it has been blocked. I tried to edit as description in [ONLYOFFICE/DocumentServer#2186](https://github.com/ONLYOFFICE/DocumentServer/issues/2186) . but not work with new version. > > > Link with [#764](https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/764) > > > [#669](https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/669) > > > > > > I fixed the problem to not using proxy server, direct insert the key and ssl cert to nginx ssl, docket volume mount ssl cert and key > > Thanks for sharing. But for my situation I just could use https with revese proxy. I also found oneway, specific `X-Forwarded-Proto` to https in nginx. > > ![Image](https://github.com/user-attachments/assets/7a8158ba-4a09-4f74-b755-01099183e167) Hi , Does it work for you?
Author
Owner

@igwyd commented on GitHub (Feb 4, 2025):

@Prosfinity As far as I understand, your issue has been solved?

@Nathan9745354 we have examples for the reverse proxy, you can see them here.

<!-- gh-comment-id:2632926927 --> @igwyd commented on GitHub (Feb 4, 2025): @Prosfinity As far as I understand, your issue has been solved? @Nathan9745354 we have examples for the reverse proxy, you can see them [here](https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx).
Author
Owner

@Prosfinity commented on GitHub (Feb 4, 2025):

@Prosfinity As far as I understand, your issue has been solved?

@Nathan9745354 we have examples for the reverse proxy, you can see them here.

Yes. Resolved, but it is another way, when using reverse proxy, it still make http request.

<!-- gh-comment-id:2633325683 --> @Prosfinity commented on GitHub (Feb 4, 2025): > @Prosfinity As far as I understand, your issue has been solved? > > @Nathan9745354 we have examples for the reverse proxy, you can see them [here](https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx). Yes. Resolved, but it is another way, when using reverse proxy, it still make http request.
Author
Owner

@irumaru commented on GitHub (Feb 8, 2025):

Hello.
I added the X-Forwarded-Proto header in Traefik Proxy as well and the error is gone!

Here is the Traefik configuration
The important part is the bottom two lines

labels:
  - traefik.enable=true
  - traefik.docker.network=traefik_shared
  - traefik.http.routers.onlyoffice.entrypoints=websecure
  - traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.example.com`)
  - traefik.http.routers.onlyoffice.tls.certresolver=letsencrypt
  # Add X-Forwarded-Proto header to the request
  - traefik.http.middlewares.x_forwarded_proto.headers.customrequestheaders.X-Forwarded-Proto=https
  - traefik.http.routers.onlyoffice.middlewares=x_forwarded_proto
<!-- gh-comment-id:2645721512 --> @irumaru commented on GitHub (Feb 8, 2025): Hello. I added the X-Forwarded-Proto header in Traefik Proxy as well and the error is gone! Here is the Traefik configuration The important part is the bottom two lines ``` labels: - traefik.enable=true - traefik.docker.network=traefik_shared - traefik.http.routers.onlyoffice.entrypoints=websecure - traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.example.com`) - traefik.http.routers.onlyoffice.tls.certresolver=letsencrypt # Add X-Forwarded-Proto header to the request - traefik.http.middlewares.x_forwarded_proto.headers.customrequestheaders.X-Forwarded-Proto=https - traefik.http.routers.onlyoffice.middlewares=x_forwarded_proto ```
Author
Owner

@iamyacin commented on GitHub (Feb 9, 2025):

Thanks a ton, @irumaru You really saved the day. 🙏

<!-- gh-comment-id:2646427420 --> @iamyacin commented on GitHub (Feb 9, 2025): Thanks a ton, @irumaru You really saved the day. 🙏✨
Author
Owner

@pakqoo commented on GitHub (Mar 30, 2025):

在配置 Nginx 作为反向代理来访问 Docker 内的 OnlyOffice 时,如果宿主机的 80 端口无法使用,并且你希望通过其他非 443 端口来进行 SSL 部署且尝试将请求转发到docker内的服务时,按照以下方式进行设置。

参考此回答:https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/432#issuecomment-2488535083

原文翻译:

如果有人遇到这个问题,这里是我在经过多小时搜索后学到的内容。

1.OnlyOffice 运行在 Docker 容器内时,现在会将所有进入 80 端口(HTTP)的请求重定向。
2.OnlyOffice 运行在 Docker 容器内时,会将路径 / 重定向到 /welcome,并且 docservice 也是如此。它使用的变量是 $the_host,这个变量是从 $http_x_forwarded_host 映射过来的,而 $http_x_forwarded_host 代表的是 X-Forwarded-Host。你可以在配置文件 /etc/nginx/includes/xxx.conf 中看到这一点。

map $http_x_forwarded_host $the_host {
    default $http_x_forwarded_host;
    "" $this_host;
}

3.因此,如果你有其他反向代理来处理 OnlyOffice,你必须将正确的 X-Forwarded-Host 值传递给容器内的 Nginx。

4.例如,在 Nginx Proxy Manager 中,你需要添加一个自定义位置,并在高级编辑框中添加以下内容:

proxy_set_header X-Forwarded-Host $http_host;

5.还有一个关于 $http_host 的细节,这个参数包括了请求的端口,假如你使用的是除了默认的 443 端口之外的 HTTPS 端口。

补充知识:

$http_host 是 Nginx 的一个内置变量,自动从客户端请求的 Host 头部获取值。它表示客户端请求时使用的主机名和端口(如果请求中有端口的话)。

例如,当用户访问 http://example.com:8080 时,$http_host 就是 example.com:8080。

这个变量在反向代理配置中非常有用,特别是在需要转发客户端请求的原始主机名(包括端口)时。$http_host 会动态获取每次请求的 Host 头并传递给下游服务,例如在 proxy_set_header 中设置。

<!-- gh-comment-id:2764388794 --> @pakqoo commented on GitHub (Mar 30, 2025): 在配置 Nginx 作为反向代理来访问 Docker 内的 OnlyOffice 时,如果宿主机的 80 端口无法使用,并且你希望通过其他非 443 端口来进行 SSL 部署且尝试将请求转发到docker内的服务时,按照以下方式进行设置。 参考此回答:https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/432#issuecomment-2488535083 **原文翻译:** > 如果有人遇到这个问题,这里是我在经过多小时搜索后学到的内容。 > > 1.OnlyOffice 运行在 Docker 容器内时,现在会将所有进入 80 端口(HTTP)的请求重定向。 > 2.OnlyOffice 运行在 Docker 容器内时,会将路径 / 重定向到 /welcome,并且 docservice 也是如此。它使用的变量是 $the_host,这个变量是从 $http_x_forwarded_host 映射过来的,而 $http_x_forwarded_host 代表的是 X-Forwarded-Host。你可以在配置文件 /etc/nginx/includes/xxx.conf 中看到这一点。 > > ``` > map $http_x_forwarded_host $the_host { > default $http_x_forwarded_host; > "" $this_host; > } > ``` > > 3.因此,如果你有其他反向代理来处理 OnlyOffice,你必须将正确的 X-Forwarded-Host 值传递给容器内的 Nginx。 > > 4.例如,在 Nginx Proxy Manager 中,你需要添加一个自定义位置,并在高级编辑框中添加以下内容: > > `proxy_set_header X-Forwarded-Host $http_host;` > > 5.还有一个关于 $http_host 的细节,这个参数包括了请求的端口,假如你使用的是除了默认的 443 端口之外的 HTTPS 端口。 **补充知识:** > $http_host 是 Nginx 的一个内置变量,自动从客户端请求的 Host 头部获取值。它表示客户端请求时使用的主机名和端口(如果请求中有端口的话)。 > > 例如,当用户访问 http://example.com:8080 时,$http_host 就是 example.com:8080。 > > 这个变量在反向代理配置中非常有用,特别是在需要转发客户端请求的原始主机名(包括端口)时。$http_host 会动态获取每次请求的 Host 头并传递给下游服务,例如在 proxy_set_header 中设置。
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#361
No description provided.