The documentserver (docker container) is listening on port 80.
The example ist working fine, so I tried setting my scenario:
https://localhost:3000 is serving my web application, including this shortened html:
- Code: Select all
<!DOCTYPE html>
<html>
<head>
<script src="/onlyoffice/web-apps/apps/api/documents/api.js"></script>
</head>
<body>
<div id="placeholder"></div>
<script>
var config = {
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd7",
"title": "Example Document Title.docx",
"url": "http://example.com/url-to-example-document.docx",
},
"documentType": "text",
"editorConfig": {
"callbackUrl": "http://example.com/url-to-callback.ashx",
},
"type": "embedded",
};
var docEditor = new DocsAPI.DocEditor("placeholder", config);
</script>
</body>
</html>
My web application redirects /onlyoffice to http://127.0.0.1 as a reverse proxy.
I can fetch https://localhost:3000/onlyoffice/web-apps/apps/api/documents/api.js just fine, it gets correctly reverse proxed to the docker container.
But what happens when I load the page in broser is this:
GET https://localhost:3000/only-office/web-apps/apps/documenteditor/embed/index.html?_dc=2017-02-17-15-22&lang=en&customer=ONLYOFFICE&frameEditorId=placeholder
302 Location http://127.0.0.1/2017-02-17-15-22/web-apps/apps/documenteditor/embed/index.html?_dc=2017-02-17-15-22&lang=en&customer=ONLYOFFICE&frameEditorId=placeholder
This of course is a problem because:
- it tries to do http instead of https
- it tries to connect to a different server
For security reasons I want the requests go to my own web app only.
How can I tell onlyoffice to use https://localhost:3000/only-office as the base url?