From 045044e7e79c3311069c9c8bbf1f51eb71a8278c Mon Sep 17 00:00:00 2001 From: Elia Zammuto Date: Mon, 9 Oct 2023 19:37:29 +0200 Subject: [PATCH] Remove origin_pin_allowed --- docs/source/about/advanced_usage.rst | 27 ------------------------ src/config.cpp | 2 -- src/config.h | 1 - src/httpcommon.cpp | 2 -- src/httpcommon.h | 1 - src_assets/common/assets/web/config.html | 19 ----------------- 6 files changed, 52 deletions(-) diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index dfc86454..e9bba678 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -612,33 +612,6 @@ cert cert = /dir/cert.pem -origin_pin_allowed -^^^^^^^^^^^^^^^^^^ - -**Description** - The origin of the remote endpoint address that is not denied for HTTP method /pin. - -**Choices** - -.. table:: - :widths: auto - - ===== =========== - Value Description - ===== =========== - pc Only localhost may access /pin - lan Only LAN devices may access /pin - wan Anyone may access /pin - ===== =========== - -**Default** - ``pc`` - -**Example** - .. code-block:: text - - origin_pin_allowed = pc - origin_web_ui_allowed ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/config.cpp b/src/config.cpp index 94657a49..726f67f8 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -380,7 +380,6 @@ namespace config { }; nvhttp_t nvhttp { - "pc", // origin_pin "lan", // origin web manager PRIVATE_KEY_FILE, @@ -997,7 +996,6 @@ namespace config { string_f(vars, "virtual_sink", audio.virtual_sink); bool_f(vars, "install_steam_audio_drivers", audio.install_steam_drivers); - string_restricted_f(vars, "origin_pin_allowed", nvhttp.origin_pin_allowed, { "pc"sv, "lan"sv, "wan"sv }); string_restricted_f(vars, "origin_web_ui_allowed", nvhttp.origin_web_ui_allowed, { "pc"sv, "lan"sv, "wan"sv }); int to = -1; diff --git a/src/config.h b/src/config.h index 14d11359..090e6b68 100644 --- a/src/config.h +++ b/src/config.h @@ -90,7 +90,6 @@ namespace config { struct nvhttp_t { // Could be any of the following values: // pc|lan|wan - std::string origin_pin_allowed; std::string origin_web_ui_allowed; std::string pkey; // must be 2048 bits diff --git a/src/httpcommon.cpp b/src/httpcommon.cpp index 2cfbfe0d..b6ea0958 100644 --- a/src/httpcommon.cpp +++ b/src/httpcommon.cpp @@ -41,13 +41,11 @@ namespace http { user_creds_exist(const std::string &file); std::string unique_id; - net::net_e origin_pin_allowed; net::net_e origin_web_ui_allowed; int init() { bool clean_slate = config::sunshine.flags[config::flag::FRESH_STATE]; - origin_pin_allowed = net::from_enum_string(config::nvhttp.origin_pin_allowed); origin_web_ui_allowed = net::from_enum_string(config::nvhttp.origin_web_ui_allowed); if (clean_slate) { diff --git a/src/httpcommon.h b/src/httpcommon.h index 02d42d26..9dc8f9b2 100644 --- a/src/httpcommon.h +++ b/src/httpcommon.h @@ -30,7 +30,6 @@ namespace http { url_get_host(const std::string &url); extern std::string unique_id; - extern net::net_e origin_pin_allowed; extern net::net_e origin_web_ui_allowed; } // namespace http diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index d2a8f4c3..6f9e89de 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -871,24 +871,6 @@ Store Username/Password separately from Sunshine's state file. - -
- - -
- The origin of the remote endpoint address that is not denied for HTTP method /pin -
-
@@ -1168,7 +1150,6 @@ "nvenc_preset": "1", "nvenc_realtime_hags": "enabled", "nvenc_twopass": "quarter_res", - "origin_pin_allowed": "pc", "origin_web_ui_allowed": "lan", "qsv_coder": "auto", "qsv_preset": "medium",