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