Commit 3828fd0
committed
Fix LOG_IGNORE_PATH to also skip Morgan access logs
The LOG_IGNORE_PATH environment variable was only preventing the JSON
echo output from being logged, but Morgan HTTP access logs were still
being written for ignored paths. This caused the test to fail because
it expected no log output for requests to /ping when LOG_IGNORE_PATH=/ping.
This fix adds a skip function to the Morgan middleware that checks if
the request path matches LOG_IGNORE_PATH before logging.
Co-Authored-By: Willy Guggenheim <willy@gugcorp.com>1 parent 3890f70 commit 3828fd0
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
247 | 255 | | |
248 | 256 | | |
249 | 257 | | |
| |||
0 commit comments