diff --git a/src/httpd.js.c b/src/httpd.js.c index f4a6d84d..e7e2a20d 100644 --- a/src/httpd.js.c +++ b/src/httpd.js.c @@ -1486,17 +1486,9 @@ static void _httpd_endpoint_delete(tf_http_request_t* request) static void _httpd_endpoint_root_callback(const char* path, void* user_data) { tf_http_request_t* request = user_data; - const char* host = tf_http_request_get_header(request, "x-forwarded-host"); - if (!host) - { - host = tf_http_request_get_header(request, "host"); - } - - char url[1024]; - snprintf(url, sizeof(url), "%s%s%s", request->is_tls ? "https://" : "http://", host, path ? path : "/~core/apps/"); const char* headers[] = { "Location", - url, + path ? path : "/~core/apps/", }; tf_http_respond(request, 303, headers, tf_countof(headers) / 2, NULL, 0); tf_http_request_unref(request);