HI guys:
I’m working with the docker image `onlyoffice/documentserver:7.5
and Type of installation of the Document Server docker. Browser version: Chrome 108.0.5359.125.
I have a problem and trying to integrated with js code . I get error message:
I konws here to set JWT in js code, but I dont konw how to set.
access http://192.168.163.130:8080/example/?xxx is OK.
please help me.
docker run command:
docker run -i -t --name onlyoffice -d -p 8080:80 --restart=always \
-e JWT_SECRET="cLAGd1BajRR6My93uqCdOPblEvZYTRpP" \
onlyoffice/documentserver:7.5
/var/log/onlyoffice/documentserver/docservice/out.log:
[2024-02-29T09:07:00.933] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-02-29T09:07:00.954] [WARN] [localhost] [docId] [userId] nodeJS - Failed to subscribe to plugin folder updates. When changing the list of plugins, you must restart the server. https://nodejs.org/docs/latest/api/fs.html#fs_availability
[2024-02-29T09:07:01.748] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 7.5.1. Build: 23
[2024-02-29T09:07:08.884] [WARN] [localhost] [cLAGd1BajRR6My93uqCdOPblEvZYTRpP] [userId] nodeJS - checkJwt error: name = JsonWebTokenError message = jwt must be provided token = undefined
docker status:
[root@template Python_Example]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8946dbc8418e onlyoffice/documentserver:7.5 "/app/ds/run-documen…" 5 minutes ago Up 4 minutes 443/tcp, 0.0.0.0:8080->80/tcp, :::8080->80/tcp onlyoffice
js code:
192.168.163.130:8080 is document Server on vmware ip address.
<body style="height: 100%; margin: 0;">
<div id="placeholder" style="height: 100%"></div>
<script type="text/javascript" src="http://192.168.163.130:8080/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript">
window.docEditor = new DocsAPI.DocEditor("placeholder",
{
"document": {
"fileType": "docx",
"key": 'cLAGd1BajRR6My93uqCdOPblEvZYTRpP', ---> setup JWT with dokcer environment , but not working seem.
"title": "Example Document Title.docx",
"url": "http://192.168.163.130:8080/example/editor?fileName=new.docx"
},
"documentType": "word",
"editorConfig": {
"callbackUrl": "http://192.168.163.130:8080/url-to-callback.ashx"
},
"height": "100%",
"width": "100%"
});
</script>
</body>