Comments (4)
Can you give me any more context - what URL are you hitting, what's your code look like, etc?
from node-unblocker.
Also, does it crash the server or just log to the console?
from node-unblocker.
Its crashing the server.
I am using unblocker with expressjs as:
app.use(new Unblocker("/proxy",{responseMiddleware:middleware}));
The issue occured when I open https://unity3d.com/get-unity/download
My middleware does not modify anything for this site.
from node-unblocker.
This worked for me:
var Unblocker = require('unblocker');
var config = {
prefix: '/proxy/',
host: null,
requestMiddleware: [],
responseMiddleware: [],
standardMiddleware: false, // disables all built-in middleware
processContentTypes: [
'text/html',
'application/xml+xhtml',
'application/xhtml+xml'
]
}
var host = Unblocker.host(config);
var referer = Unblocker.referer(config);
var cookies = Unblocker.cookies(config);
var hsts = Unblocker.hsts(config);
var hpkp = Unblocker.hpkp(config);
var csp = Unblocker.csp(config);
var redirects = Unblocker.redirects(config);
var decompress = Unblocker.decompress(config);
var charsets = Unblocker.charsets(config);
var urlPrefixer = Unblocker.urlPrefixer(config);
var metaRobots = Unblocker.metaRobots(config);
var contentLength = Unblocker.contentLength(config);
config.requestMiddleware = [
host,
referer,
decompress.handleRequest,
cookies.handleRequest
// custom requestMiddleware here
];
config.responseMiddleware = [
hsts,
hpkp,
csp,
redirects,
decompress.handleResponse,
charsets,
urlPrefixer,
cookies.handleResponse,
metaRobots
// custom responseMiddleware here
//contentLength
];
function u(m) {
config.responseMiddleware.push(m);
config.responseMiddleware.push(contentLength);
return new Unblocker(config);
}
module.exports = u;
from node-unblocker.
Related Issues (20)
- Weird Redirect when deploying with openode.io HOT 2
- Error HOT 1
- Discord isn't working. HOT 5
- Discord link HOT 2
- Next.js support HOT 3
- maleik2
- JustAguy HOT 1
- In Search Of A Proxy HOT 2
- Setting a static URL without typing it after the prefix HOT 7
- Google safe-browsing flags unblocker as phishing
- Proxy not working with Nike.com and Cloudflare HOT 2
- My administrator's website still blocks it even when I use unblockernode
- Z_DATA_ERROR HOT 7
- use node-unblocker in client sveltekit without node js HOT 1
- how to use node-unblocker with https-proxy-agent HOT 1
- sometime error and stuck when use in docker HOT 3
- https://www.youtube.com/embed/XGxIE1hr0w4 --This type of URL cannot be proxied HOT 8
- URL PATH - [feature] HOT 6
- how to add ads in unblocked website HOT 3
- how to bypass cloudflare Human Veriication HOT 1
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 node-unblocker.