You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add swagger-ui-express to package.json
Refactor index.ts as follows:
// IMPORTANT: all routes that do not require JWT authentication must be declared ahead of registering the middleware with app.use
app.get('/', cors(), function (req, res) {
res.status(200).send('Hello World! I am the tenants-api API ' + process.env.API_VERSION);
});
const xssConfig = {
stripIgnoreTag: true
};
app.use('/', new XSSController(xssConfig).register());
//setup route for documents
app.use('/docs/', cors(), swaggerUi.serveWithOptions({ redirect: false }), swaggerUi.setup(swaggerDocument));
Note what we are doing here is removing JWT validation from the health check and docs route.
Add boiler plate to the serverless yaml for the docs and health check:
Add swagger-ui-express to package.json
Refactor index.ts as follows:
Note what we are doing here is removing JWT validation from the health check and docs route.
Add boiler plate to the serverless yaml for the docs and health check:
The text was updated successfully, but these errors were encountered: