IP Blocking (#12015)

* start implementing an ip blocker

* fix comments and add to list of middlewares

* fix code, comment code and improve response

* wip tests

* fix order

* fixes and tests
This commit is contained in:
Matteo Pagliazzi
2020-03-28 15:44:54 +01:00
committed by GitHub
parent a00add46a7
commit 9ab9b0f553
8 changed files with 212 additions and 2 deletions

View File

@@ -25,4 +25,6 @@ export default {
missingCustomerId: 'Missing "req.query.customerId"',
missingPaypalBlock: 'Missing "req.session.paypalBlock"',
missingSubKey: 'Missing "req.query.sub"',
ipAddressBlocked: 'This IP address has been blocked from accessing Habitica. This may be due to a breach of our Terms of Service or technical issue originating at this IP address. For details or to ask to be unblocked, please email admin@habitica.com or ask your parent or guardian to email them. Include your Habitica @ Username or User Id in the email if you have one.',
};