mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-17 13:30:01 -04:00
Updated Local Node Unblocker
This commit is contained in:
parent
f02f8b0e74
commit
68158a086e
2 changed files with 7 additions and 4 deletions
|
@ -32,7 +32,7 @@ function addGa(html) {
|
||||||
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);",
|
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);",
|
||||||
"})();",
|
"})();",
|
||||||
"</script>"
|
"</script>"
|
||||||
].join("\n");
|
].join("\n");
|
||||||
html = html.replace("</body>", ga + "\n\n</body>");
|
html = html.replace("</body>", ga + "\n\n</body>");
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
|
@ -53,7 +53,7 @@ function googleAnalyticsMiddleware(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var unblockerConfig = {
|
var unblockerConfig = {
|
||||||
prefix: '/proxy/',
|
prefix: '/run/',
|
||||||
responseMiddleware: [
|
responseMiddleware: [
|
||||||
googleAnalyticsMiddleware
|
googleAnalyticsMiddleware
|
||||||
]
|
]
|
||||||
|
@ -65,7 +65,7 @@ var unblockerConfig = {
|
||||||
app.use(unblocker(unblockerConfig));
|
app.use(unblocker(unblockerConfig));
|
||||||
|
|
||||||
// serve up static files *after* the proxy is run
|
// serve up static files *after* the proxy is run
|
||||||
app.use('/', express.static(__dirname + '/public'));
|
app.use('/', express.static(__dirname + '/nodeub'));
|
||||||
|
|
||||||
// this is for users who's form actually submitted due to JS being disabled or whatever
|
// this is for users who's form actually submitted due to JS being disabled or whatever
|
||||||
app.get("/no-js", function(req, res) {
|
app.get("/no-js", function(req, res) {
|
||||||
|
@ -76,4 +76,4 @@ app.get("/no-js", function(req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// for compatibility with gatlin and other servers, export the app rather than passing it directly to http.createServer
|
// for compatibility with gatlin and other servers, export the app rather than passing it directly to http.createServer
|
||||||
module.exports = app;
|
module.exports = app;
|
|
@ -26,5 +26,8 @@
|
||||||
"newrelic": "^1.20.2",
|
"newrelic": "^1.20.2",
|
||||||
"through": "^2.3.8",
|
"through": "^2.3.8",
|
||||||
"unblocker": "*"
|
"unblocker": "*"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue