Report status on not local mode
This commit is contained in:
@ -126,6 +126,7 @@ int client_request_handler(sock *client, unsigned long client_num, unsigned int
|
|||||||
|
|
||||||
conf = get_host_config(host);
|
conf = get_host_config(host);
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
|
print("Host unknown, redirecting to default");
|
||||||
res.status = http_get_status(307);
|
res.status = http_get_status(307);
|
||||||
sprintf(buf0, "https://%s%s", DEFAULT_HOST, req.uri);
|
sprintf(buf0, "https://%s%s", DEFAULT_HOST, req.uri);
|
||||||
http_add_header_field(&res.hdr, "Location", buf0);
|
http_add_header_field(&res.hdr, "Location", buf0);
|
||||||
@ -133,6 +134,7 @@ int client_request_handler(sock *client, unsigned long client_num, unsigned int
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (conf->type != CONFIG_TYPE_LOCAL) {
|
if (conf->type != CONFIG_TYPE_LOCAL) {
|
||||||
|
print("Reverse proxy for %s:%i", conf->rev_proxy.hostname, conf->rev_proxy.port);
|
||||||
// TODO Reverse Proxy
|
// TODO Reverse Proxy
|
||||||
res.status = http_get_status(501);
|
res.status = http_get_status(501);
|
||||||
goto respond;
|
goto respond;
|
||||||
|
Reference in New Issue
Block a user