Open geert-janklaps opened 4 years ago
I had this exact problem.
I solved this issue. Go into proxy.js and add an if statement checking if res.header() exists before running code that uses the function. It seems karma produces some result that doesn't have this, but the proxy expects it to always be there. If you add that if statement, it'll run fine. (I patched it using patch-package).
When using this middleware in combination with Karma tests, the middleware makes the tests fail.![image](https://user-images.githubusercontent.com/2744548/84699848-90382880-af52-11ea-973c-d4c7f2ae809c.png)
Didn't have the time yet to dive into this one myself. I included this middleware as the default proxy for on-premise developments in the easy-ui5 generator. (details can be found here)