chimurai / http-proxy-middleware

:zap: The one-liner node.js http-proxy middleware for connect, express, next.js and more
MIT License
10.68k stars 826 forks source link

Fix exception when route doesn't match configured filter #871

Closed TomaszG closed 4 months ago

TomaszG commented 1 year ago

Description

Check if the next function is defined/provided before executing it

Motivation and Context

Fixes #870

How has this been tested?

Verified whether the error is not thrown when middleware receives a route that doesn't match the filter.

Types of changes

Checklist:

chimurai commented 4 months ago

Next.js is supported in: https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.0