Skip to content

Commit

Permalink
Revert "Allow trailing/leading slashes in base path config"
Browse files Browse the repository at this point in the history
This reverts commit 52e4f3b.
  • Loading branch information
Ndpnt committed May 14, 2024
1 parent 03caa27 commit 9a1c756
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/collection-api/server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import path from 'path';

import config from 'config';
import express from 'express';

Expand All @@ -15,7 +13,7 @@ if (process.env.NODE_ENV !== 'test') {
app.use(loggerMiddleware);
}

const BASE_PATH = path.join('/', config.get('@opentermsarchive/engine.collectionAPI.basePath'), 'v1');
const BASE_PATH = `${config.get('@opentermsarchive/engine.collectionAPI.basePath')}/v1`;

app.use(BASE_PATH, apiRouter(BASE_PATH));
app.use(errorsMiddleware);
Expand Down

0 comments on commit 9a1c756

Please sign in to comment.