No9 / harmon

middleware for node-http-proxy to modify the remote website response with trumpet
Other
424 stars 62 forks source link

Flexible headers #47

Closed peebles closed 6 years ago

peebles commented 6 years ago

Minor change to fallback to the headers, if this.getHeader() returns undefined. Not exactly sure why, but this was need to use harmon as middleware when using s3proxy instead of node-http-proxy. There is a case when headers variable is { "content-type": "text/html", ... } but this.getHeader( 'content-type' ) returns undefined. Maybe classic "this" handling in javascript.

No9 commented 6 years ago

@peebles pushed into npm as 1.4.3