From ab9ae594c29b62dbedda09dcca874f3b584a36a4 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 19 Feb 2023 11:42:37 +0100 Subject: [PATCH] Set a better self signed cert path for the HTTPServerSimple. --- modules/http_server_simple/http_server_simple.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/http_server_simple/http_server_simple.cpp b/modules/http_server_simple/http_server_simple.cpp index 9e96bfb21..f41766f60 100644 --- a/modules/http_server_simple/http_server_simple.cpp +++ b/modules/http_server_simple/http_server_simple.cpp @@ -435,11 +435,9 @@ void HTTPServerSimple::_stop_workers() { } void HTTPServerSimple::_set_internal_certs(Ref p_crypto) { - //const String cache_path = EditorSettings::get_singleton()->get_cache_dir(); - //TODO - const String cache_path = "./cache/web/"; - const String key_path = cache_path.plus_file("html5_server.key"); - const String crt_path = cache_path.plus_file("html5_server.crt"); + const String cache_path = "user://cache/web/"; + const String key_path = cache_path.plus_file("http_server_simple_cert.key"); + const String crt_path = cache_path.plus_file("http_server_simple_cert.crt"); bool regen = !FileAccess::exists(key_path) || !FileAccess::exists(crt_path); if (!regen) {