This commit is contained in:
parent
85a5f3c2fb
commit
86b07af63d
@ -29,13 +29,14 @@ class GatewayClass {
|
||||
|
||||
public deny (res: ServerResponse): void {
|
||||
res.statusCode = 403;
|
||||
res.end();
|
||||
res.end ();
|
||||
}
|
||||
|
||||
public redirect (res: ServerResponse): void {
|
||||
if (typeof this._options.redirect_url !== 'string')
|
||||
return this.deny(res);
|
||||
|
||||
if (typeof this._options.redirect_url !== 'string') {
|
||||
this.deny (res);
|
||||
return;
|
||||
}
|
||||
res.statusCode = 302;
|
||||
res.setHeader ('Location', this._options.redirect_url);
|
||||
res.end ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user