fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Timo Hocker 2022-01-03 14:46:12 +01:00
parent 85a5f3c2fb
commit 86b07af63d
Signed by: Timo
GPG Key ID: AA43099EDEEB12AC

View File

@ -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 ();