Fix https requests redirecting to http.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4781 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-19 00:48:42 +00:00
parent 6ecb3ccd08
commit 64249976a8

View File

@ -195,7 +195,7 @@ static void _httpd_callback_internal(tf_http_request_t* request, bool is_websock
} }
JSValue client = JS_NewObject(context); JSValue client = JS_NewObject(context);
JS_SetPropertyStr(context, client, "tls", JS_FALSE); JS_SetPropertyStr(context, client, "tls", request->is_tls ? JS_TRUE : JS_FALSE);
JS_SetPropertyStr(context, request_object, "client", client); JS_SetPropertyStr(context, request_object, "client", client);
JSValue response_object = JS_NewObjectClass(context, _httpd_request_class_id); JSValue response_object = JS_NewObjectClass(context, _httpd_request_class_id);