Skip to content

Commit

Permalink
[bug] Fix path to document_editor_service_worker.js; Fix bug 73137
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Feb 7, 2025
1 parent 2cfc936 commit 5b96afe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DocService/sources/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,13 @@ docsCoServer.install(server, () => {
});
});
app.get('/document_editor_service_worker.js', apicache.middleware("5 min"), async (req, res) => {
//make handler only for development version
res.sendFile(path.resolve("../../sdkjs/common/serviceworker/document_editor_service_worker.js"));
let staticContent = config.get('services.CoAuthoring.server.static_content');
if (staticContent['/sdkjs']) {
//make handler only for development version
res.sendFile(path.resolve(staticContent['/sdkjs'].path + "/common/serviceworker/document_editor_service_worker.js"));
} else {
res.sendStatus(404);
}
});
app.use((err, req, res, next) => {
let ctx = new operationContext.Context();
Expand Down

0 comments on commit 5b96afe

Please sign in to comment.