Skip to content

Commit

Permalink
Merge pull request #1 from expresso/hotfix/no-ping-trace
Browse files Browse the repository at this point in the history
Remove /ping from deeptrace
  • Loading branch information
roziscoding authored May 13, 2019
2 parents fcc02e2 + 2e651ce commit 85a51e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@expresso/app",
"version": "1.0.5",
"version": "1.0.6",
"description": "Basic @expresso express boilerplate",
"main": "dist/index.js",
"dependencies": {
Expand Down
6 changes: 5 additions & 1 deletion src/middlewares/deep-trace.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const DeepTrace = require('deeptrace-express')
import { Request, Response, NextFunction } from 'express'

// TODO: Make this reflect the whole possibility of deepstream configuration options
export interface IDeepTraceOptions {
Expand All @@ -13,5 +14,8 @@ export interface IDeepTraceOptions {
* @param config - Deepstream's configuration options
*/
export function factory (config: IDeepTraceOptions) {
return DeepTrace.middleware(config)
return (req: Request, res: Response, next: NextFunction) => {
if (req.path !== '/ping') return DeepTrace.middleware(config)(req, res, next)
return next()
}
}

0 comments on commit 85a51e6

Please sign in to comment.