From 8aac2d054f4631f3ea32308be4bb77c850dc5d5b Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:31:36 -0600 Subject: [PATCH] fix: added ability to disable removing of trailing slashes --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 994216b..19276c1 100644 --- a/index.js +++ b/index.js @@ -44,6 +44,7 @@ class API { // eslint-disable-next-line complexity constructor(config, Users) { this.config = { + removeTrailingSlashes: true, ...sharedConfig('API'), ...config }; @@ -120,7 +121,7 @@ class API { if (this.config.auth) app.use(auth(this.config.auth)); // Remove trailing slashes - app.use(removeTrailingSlashes); + if (this.config.removeTrailingSlashes) app.use(removeTrailingSlashes); // I18n if (this.config.i18n) {