Skip to content

Commit

Permalink
fix(authentication): read public routes from the right variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Gautreau committed Oct 26, 2020
1 parent efb3f9c commit e9f4f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ exports.ResourcesRoute = {};
*/
exports.ensureAuthenticated = (request, response, next) => {
const parsedUrl = url.parse(request.originalUrl);
const forestPublicRoutes = this.PUBLIC_ROUTES.map((route) => `/forest${route}`);
const forestPublicRoutes = PUBLIC_ROUTES.map((route) => `/forest${route}`);

if (forestPublicRoutes.includes(parsedUrl.pathname)) {
next();
Expand Down

0 comments on commit e9f4f7c

Please sign in to comment.