regression: read prefix from handle fn as well

fixes #7028
This commit is contained in:
pooya parsa 2020-03-12 18:33:22 +01:00
parent 9e69f60d38
commit 5a6cde3ebc

View File

@ -206,7 +206,12 @@ export default class Server {
} }
} }
// SubApp (Express) // Prefix on handle (proxy-module)
if (middleware.handle.prefix !== undefined && middleware.prefix === undefined) {
middleware.prefix = middleware.handle.prefix
}
// sub-app (express)
if (typeof middleware.handle.handle === 'function') { if (typeof middleware.handle.handle === 'function') {
const server = middleware.handle const server = middleware.handle
middleware.handle = server.handle.bind(server) middleware.handle = server.handle.bind(server)