From 9d3fe5f2c2466540a1f7a1d600f724826969c496 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 9 Nov 2022 16:19:25 +0200 Subject: [PATCH] prepend slash if missing --- src/server/interfaces/Endpoint.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/interfaces/Endpoint.js b/src/server/interfaces/Endpoint.js index 8067fd1..f7d1ccd 100644 --- a/src/server/interfaces/Endpoint.js +++ b/src/server/interfaces/Endpoint.js @@ -7,6 +7,7 @@ class Endpoint { this.server = server; if (!path) Util.fatal(new Error('Missing path in endpoint')); + if (!path.startsWith('/')) path = `/${path}`; this.path = path; if (name) this.name = name;