Skip to content

Is there a way to Disable/Enable features? #160

Answered by Antebios
Antebios asked this question in Q&A
Discussion options

You must be logged in to vote

I figured out how to disable authentication.

In "\src\middlewares\auth.js" replace the "auth" constant with:

const auth = (...requiredRights) => async (req, res, next) => {
  return next();
};

I'm sure this could be done better and with a feature flag and an error catch, but this will not require a bearer token and all api routes are accessible. This is great for local development and testing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Antebios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant