Closed ingiulio closed 9 years ago
:+1:
The dataAdapter also deal with the headers, should this go there? I do agree that this header should be respected, not sure if this is the right place. eg, should getXForwardedForHeader
also be moved into the data adapter? OR is there something I'm missing why this needs to happen here?
ah I totally missed https://github.com/ingiulio/rendr/blob/allowXHTTPMethodOverrideHeader/server/middleware/apiProxy.js#L24 where that is defined, I thought it'd just take everything in, not start fresh. Apologies and :+1: for this, and perhaps thinking about a way that all future headers would be respected, not just whitelisted.
This would allow more flexibility into
apiProxy
, allowing the usage of thex-http-method-override header
. Currently, if we try to to use Backbone'semulateHTTP
option ( http://backbonejs.org/#Sync-emulateHTTP), the header set from the client is then discarded by the Rendr app.