mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
crowler blocking added to home page
This commit is contained in:
parent
2be6f8074a
commit
71e5d9c333
1 changed files with 8 additions and 0 deletions
8
main.cpp
8
main.cpp
|
@ -106,6 +106,14 @@ int main(int ac, const char* av[]) {
|
||||||
//for (const auto& m : req.headers)
|
//for (const auto& m : req.headers)
|
||||||
// cout << m.first << ": " << m.second << endl;
|
// cout << m.first << ": " << m.second << endl;
|
||||||
|
|
||||||
|
// there is some robot scanning everything
|
||||||
|
// on the explorer. I block it with this
|
||||||
|
if (!xmreg::does_header_has(req, "Accept", "q=.2, */*; q=.2").empty())
|
||||||
|
{
|
||||||
|
cout << "Scanner with q=.2, */*; q=.2 blocked!" << endl;
|
||||||
|
return crow::response(400);
|
||||||
|
}
|
||||||
|
|
||||||
return xmrblocks.index2();
|
return xmrblocks.index2();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue