Hi all,
I got Seafile 12.0.11 Pro up and running yesterday. Seafile is running at seafile.example.com
. It works perfectly fine, I can create all files. I can edit Markdown files in the browser, and I can download files.
SeaDoc is running at sdoc.example.com
and is running “Welcome to sdoc-server. The current version is 1.0.5”.
However, Seadoc isnt doing much. I cannot open .sdoc files
, and office (e.g., .docx
) files will not preview.
Download URLs do work, e.g.:
https://drive.example.com/seafhttp/repos/d33781e5-d965-464d-a392-05662fe0a315/files//Test.sdoc/?op=download
But the request as formulated by Seafile and sent to SeaDoc which does not work, e.g.:
curl -i -X GET "https://sdoc.example.com/sdoc-server/api/v1/docs/a9be4f40-8395-46a3-af87-f1a91e8a907c/" \
-H "Accept: application/json, text/plain, */*" \
-H "Authorization: Token eyJ...VQ"
This request returns this 404:
{
"message": "Request failed with status code 404",
"name": "AxiosError",
"stack": "AxiosError: Request failed with status code 404\n at Te (https://drive.example.com/media/assets/frontend/static/js/viewFileSdoc.db4ce4b9.js:2:4353767)\n at XMLHttpRequest.v (https://drive.example.com/media/assets/frontend/static/js/viewFileSdoc.db4ce4b9.js:2:4358073)\n at it.request (https://drive.example.com/media/assets/frontend/static/js/viewFileSdoc.db4ce4b9.js:2:4366345)",
"config": {
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
...
"headers": {
"Accept": "application/json, text/plain, */*",
"Authorization": "Token eyJh...VQ"
},
"method": "get",
"url": "https://sdoc.example.com/sdoc-server/api/v1/docs/a9be4f40-8395-46a3-af87-f1a91e8a907c/",
"allowAbsoluteUrls": true
},
"code": "ERR_BAD_REQUEST",
"status": 404
}
Build
I followed the seadoc setup for v12.
My docker compose is a combination of seafile-server.yml and seadoc.yml with one difference:
The SeaDoc hostname is not the same as the Seafile hostname:
SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME}
SEADOC_SERVER_URL=${SERVER_PROTOCOL:-http}://${SEADOC_SERVER_HOSTNAME}/sdoc-server
With
SEAFILE_SERVER_HOSTNAME=seafile.example.com
SEADOC_SERVER_HOSTNAME=sdoc.example.com
Of course ENABLE_SEADOC=true
.
The ports of the seafile and seadoc services are respectively:
ports:
- "8012:80"
ports:
- "7070:80"
Disabling SSL
Ive tried disabling SSL of sdoc.example.com
and changing the protocol to http from https, and disabled mixed-content, but that didnt resolve anything.
How can I configure a file request that my seadoc-server responds to with OK?
From there I might be able to find the difference with how Seafile currently constructs the file request.