mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
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:
@@ -42,6 +42,15 @@ export class NotFound extends CustomError {
|
||||
}
|
||||
}
|
||||
|
||||
export class Forbidden extends CustomError {
|
||||
constructor (customMessage) {
|
||||
super();
|
||||
this.name = this.constructor.name;
|
||||
this.httpCode = 403;
|
||||
this.message = customMessage || 'Access forbidden.';
|
||||
}
|
||||
}
|
||||
|
||||
export class NotImplementedError extends CustomError {
|
||||
constructor (str) {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user