Adds a setConfig option to hoxy#89
Conversation
By allowing the user to setConfig, they can customise the request validProtocols, removeHeaders and nonEntityMethods with custom values.
|
Thanks for taking the time to do a PR. I'm concerned since these changes would force the same configuration on every running instance of a proxy, it could create bugs in some scenarios. For example two areas in a codebase that don't really "know" about each other, trying to set config on hoxy and conflicts arising. To the extent these things should be customizable, they should be customizable per-instance, i.e. by passing options to var proxy = hoxy.createServer({
...
validProtocols: { ... },
removeHeaders: { ... },
nonEntityMethods: { ... },
});I realize it's a deeper change, but I think it would be the right thing to do. |
|
Never mind, I see you mentioned that they do fail on master. |
|
Just pushed an update that fixed the test failures on my end. Let me know if you still run into issues. |
By allowing the user to setConfig, they can customise the request validProtocols, removeHeaders and nonEntityMethods with custom values.
Note: tests do not pass for me (they also fail on
master), am I doing something wrong to get them working?