Closed DTrejo closed 9 years ago
Thanks for the kind words. As always pull requests are greatfully recieved. Especially with additional documentation for realworld use cases :)
Yes I'll send over the two lines tomorrow.
Key info:
1) remove accept header before making request to remote site 2) set host header to the host of the site you are proxying to.
These things fixed my issues.
I wasnt able to use all of Harmon because I could not append HTML to an element using trumpet :(
But I still used your monkeypatching code and conditional execution. Very helpful.
I'll credit you when I publish the module, probably also tomorrow.
Cheers! David On Feb 11, 2015 2:33 PM, "Anton Whalley" notifications@github.com wrote:
Thanks for the kind words. As always pull requests are greatfully recieved. Especially with additional documentation for realworld use cases :)
— Reply to this email directly or view it on GitHub https://github.com/No9/harmon/issues/19#issuecomment-73979579.
For those reading this later, you can see what I came up with over here: https://github.com/DTrejo/neo-proxy
Hi @DTrejo Gzip support and a sample has been added to the repo https://github.com/No9/harmon/blob/master/examples/gzipped.js
Thanks man!
Also, check it out, I gave you credit :)
https://github.com/DTrejo/neo-proxy#credits
Have a great day man and thanks for saving me so much time & not having to write this myself :)
Best, D
:+1: thanks for the credit
Hi, I am using this for a site that returns gzip. I think that this was causing problems for Harmon. I have JUST realized that in order to solve this easily, we could modify the headers to show that we do not support gzip, and the server would respond appropriately. What do you think of a change like this?
I will be writing a snippet to accomplish this using http-proxy's
proxyReq
event, would you like a PR update to your README to teach others this strategy?Cheers, D
PS Thanks for Harmon, it is pretty cool & useful :)
PPS Here is a change to host headers which allows another site to show at e.g. localhost:8888
The key line is