Comments (9)
The code in the examples folder does work.
But not the code in the readme. Using the code in the readme or in the examples folder in my own folder gives me the error above. What am I missing? :(
from harmon.
Found the culprit. I was using a http-proxy version that was newer than the one used by harmon.
Maybe this could be mentioned in the readme. That to make require('http-proxy') work you have to npm install http-proxy
but that gives you a newer version than harmon uses as a dependency and therefore it does not work. Harmon uses http-proxy 0.8.7
from harmon.
@michaellopez thanks for the heads up. If you contribute a fix I can give you write access on this repo.
from harmon.
@No9 I will see what I can do. No promises :)
from harmon.
@michaellopez I think this is an example of what's required. https://github.com/nodejitsu/node-http-proxy/blob/caronte/examples/middleware/modifyResponse-middleware.js
from harmon.
I'm running into the same issue. What do I need to fix it? See: http://stackoverflow.com/questions/23097898/modifying-html-response-in-node-http-proxy-using-harmon-protocol-error
from harmon.
@Stwissel I'm afraid I can't be of much help. I haven't had time to wrap my head around this issue.
from harmon.
Put a response into stackoverflow http://stackoverflow.com/questions/23097898/modifying-html-response-in-node-http-proxy-using-harmon-no-output-maniputlatio/23111145#23111145
Based on this https://gist.githubusercontent.com/No9/10874082/raw/38a26d15b7ecbd875eee0988c94af0333927b98a/host-multiaction.js
Maybe time to do #8
from harmon.
Opened #9 as the main issue is resolved but there is a header mapping feature required
from harmon.
Related Issues (20)
- how to use harmon on specify url HOT 1
- prepareRequestSelectors HOT 1
- Dealing with bad html HOT 9
- How to use in non-html? HOT 2
- Connection hangs for very generic selectors HOT 6
- doge.js is redirecting to original site with no injection HOT 7
- Request hangs
- gzip content length issue HOT 2
- Proxy a m3u8 file HOT 1
- Variable Targets
- Use with browsersync HOT 2
- js/css filter with query params HOT 2
- Doesn't work nowadays? Examples and tests fail HOT 9
- Replacing the value inside an element HOT 3
- write() getting called before writeHead() on gzip'd content causes failures HOT 2
- help w/ hello world, they don't require harmon? HOT 1
- got error on zlib HOT 1
- No selector callbacks being invoked for certain sites HOT 2
- How to modify a file from a response
- Content Length not deleted on HTML rewrite if HTML Only HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from harmon.