We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0f3356 commit 0aa3d9aCopy full SHA for 0aa3d9a
src/index.ts
@@ -15,7 +15,7 @@ export const stringReplace = (
15
const opts = { ...defaultOptions, ...options };
16
return (_req: Request, res: Response, next: NextFunction) => {
17
hijackResponse(res, function(err, res) {
18
- const contentType = res.get('content-type');
+ const contentType = res.get('content-type') || '';
19
if (opts.contentTypeFilterRegexp.test(contentType)) {
20
if (err) {
21
res.unhijack(); // Make the original res object work again
0 commit comments