Skip to content

Commit

Permalink
BE-663 SWAGGER should not be available in prod
Browse files Browse the repository at this point in the history
* Modified Explorer.js to run only in dev env

Change-Id: I95d8b41747154c064985d1741da2d12dbe4f3f65
Signed-off-by: Uma Parameshwari <umaparameswari11@gmail.com>
  • Loading branch information
umaparam committed Jun 10, 2019
1 parent 184aed7 commit 2cf69f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class Explorer {
})
);
this.app.use(passport.initialize());
this.app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
if (process.env.NODE_ENV !== 'production') {
this.app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
}
this.app.use(compression());
this.persistence = null;
this.platforms = [];
Expand Down

0 comments on commit 2cf69f8

Please sign in to comment.