We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a15fdd0 commit a1400e4Copy full SHA for a1400e4
src/backend/src/services/worker/src/s2w-router.js
@@ -2,7 +2,7 @@ import { match } from 'path-to-regexp';
2
3
function inits2w() {
4
// s2w router itself: Not part of any package, just a simple router.
5
- const s2w = {
+ const router = {
6
routing: true,
7
handleCors: true,
8
map: new Map(),
@@ -103,11 +103,11 @@ function inits2w() {
103
return new Response("Path not found", { status: 404, statusText: "Not found" });
104
}
105
106
- globalThis.s2w = s2w;
+ globalThis.router = router;
107
self.addEventListener("fetch", (event) => {
108
- if (!s2w.routing)
+ if (!router.routing)
109
return false;
110
- event.respondWith(s2w.route(event));
+ event.respondWith(router.route(event));
111
})
112
113
0 commit comments