lemaiwo / ui5-middleware-route-proxy

UI5Tooling route proxy
MIT License
11 stars 4 forks source link

path issue since 1.0.5 #9

Closed DerGuteWolf closed 3 years ago

DerGuteWolf commented 4 years ago

Until 1.0.5 using path "sap" in the configuration worked, since https://github.com/lemaiwo/ui5-middleware-route-proxy/commit/64c638bcb7b4d15ae2f55d29de857c83ac1d0192 it needs to be "/sap" since you/kovboyjder substituted var dirname = req.url.replace(/^\/([^\/]*).*$/, '$1'); with var dirname = Object.keys(routing).filter(sPath => req.url.startsWith(sPath)) as sPath always starts with a / (and in the regexp you had ^\/( which leaves the leading / outside). Unfortunatly this is not reflected in the readme.md .