Skip to content

Commit

Permalink
fix: added ability to disable removing of trailing slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jan 25, 2024
1 parent fc0a8a5 commit 8aac2d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class API {
// eslint-disable-next-line complexity
constructor(config, Users) {
this.config = {
removeTrailingSlashes: true,
...sharedConfig('API'),
...config
};
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8aac2d0

Please # to comment.