mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-13 12:00:02 -04:00
Minor Change (oops)
This commit is contained in:
parent
af2ca7e034
commit
6bd7e10c4d
31 changed files with 34771 additions and 1 deletions
14
src/Corrosion/lib/server/middleware.js
Normal file
14
src/Corrosion/lib/server/middleware.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
function address(arr = []) {
|
||||
return function (ctx) {
|
||||
ctx.address = arr[Math.floor(Math.random() * arr.length)];
|
||||
};
|
||||
};
|
||||
|
||||
function blacklist(arr = [], page = '') {
|
||||
return function (ctx) {
|
||||
if (arr.includes(ctx.url.hostname)) ctx.clientResponse.end(page);
|
||||
};
|
||||
};
|
||||
|
||||
exports.address = address;
|
||||
exports.blacklist = blacklist;
|
Loading…
Add table
Add a link
Reference in a new issue