Frontend: Add support for adding servers

This commit is contained in:
2023-09-12 10:19:46 +02:00
parent 5830236ea5
commit f36cd5085f
4 changed files with 118 additions and 10 deletions

View File

@@ -297,6 +297,31 @@ sub sendBadRequest {
$aClient->send($response);
}
sub sendForbidden {
my $aClient = $_[0];
my $aMessage = $_[1];
my $content = "<h1>403 Forbidden</h1><h6>irclogger_web</h6>Error: $aMessage";
my $response = getBaseResponse(403, "Forbidden");
$response.="Content-Type: text/html, charset=utf-8\r\n";
$response.="Content-Length: ".length($content)."\r\n\r\n";
$response.=$content;
$aClient->send($response);
}
sub sendConflict {
my $aClient = $_[0];
my $aMessage = $_[1];
my $content = "<h1>409 Conflict</h1><h6>irclogger_web</h6>Error: $aMessage";
my $response = getBaseResponse(409, "Conflict");
$response.="Content-Type: text/html, charset=utf-8\r\n";
$response.="Content-Length: ".length($content)."\r\n\r\n";
$response.=$content;
$aClient->send($response);
}
sub redirect {
my $aClient = $_[0];
my $aLocation = $_[1];