When running Karma test runner using this proxy, an error is thrown.
In lib/proxy.js around line 18 a method 'header' is called on res. However, Karma sends requests that don't contain this method, thus when the check occurs it throws an error.
Since the request Karma is sending don't even need the header method, I added a check to see if the method is there. If it's not, the code just skips it, allowing Karma's requests to go through without a problem.
When running Karma test runner using this proxy, an error is thrown.
In lib/proxy.js around line 18 a method 'header' is called on res. However, Karma sends requests that don't contain this method, thus when the check occurs it throws an error.
Since the request Karma is sending don't even need the header method, I added a check to see if the method is there. If it's not, the code just skips it, allowing Karma's requests to go through without a problem.