Redirect to https even on reverse proxy

This commit is contained in:
lorenz.stechauner committed 2021-01-09 12:57:24 +01:00
1 parent dc5d1bebcc
commit e1edb48a3c
1 file changed
+5
+5
View File
@@ -164,6 +164,11 @@ int client_request_handler(sock *client, unsigned long client_num, unsigned int
}
goto respond;
}
} else if (!client->enc) {
res.status = http_get_status(308);
sprintf(buf0, "https://%s%s", host, req.uri);
http_add_header_field(&res.hdr, "Location", buf0);
goto respond;
}
if (conf->type == CONFIG_TYPE_LOCAL) {