Skip to content

Commit 5b96afe

Browse files
[bug] Fix path to document_editor_service_worker.js; Fix bug 73137
1 parent 2cfc936 commit 5b96afe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

DocService/sources/server.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,13 @@ docsCoServer.install(server, () => {
394394
});
395395
});
396396
app.get('/document_editor_service_worker.js', apicache.middleware("5 min"), async (req, res) => {
397-
//make handler only for development version
398-
res.sendFile(path.resolve("../../sdkjs/common/serviceworker/document_editor_service_worker.js"));
397+
let staticContent = config.get('services.CoAuthoring.server.static_content');
398+
if (staticContent['/sdkjs']) {
399+
//make handler only for development version
400+
res.sendFile(path.resolve(staticContent['/sdkjs'].path + "/common/serviceworker/document_editor_service_worker.js"));
401+
} else {
402+
res.sendStatus(404);
403+
}
399404
});
400405
app.use((err, req, res, next) => {
401406
let ctx = new operationContext.Context();

0 commit comments

Comments
 (0)