Skip to content

Commit

Permalink
Remove origin_pin_allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
TheElixZammuto authored and cgutman committed Oct 15, 2023
1 parent 329620d commit 045044e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 52 deletions.
27 changes: 0 additions & 27 deletions docs/source/about/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 0 additions & 2 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ namespace config {
};

nvhttp_t nvhttp {
"pc", // origin_pin
"lan", // origin web manager

PRIVATE_KEY_FILE,
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/httpcommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/httpcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 0 additions & 19 deletions src_assets/common/assets/web/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -871,24 +871,6 @@ <h1 class="my-4">Configuration</h1>
Store Username/Password separately from Sunshine's state file.
</div>
</div>
<!--Origin PIN Allowed-->
<div class="mb-3">
<label for="origin_pin_allowed" class="form-label"
>Origin PIN Allowed</label
>
<select
id="origin_pin_allowed"
class="form-select"
v-model="config.origin_pin_allowed"
>
<option value="pc">Only localhost may access /pin</option>
<option value="lan">Only those in LAN may access /pin</option>
<option value="wan">Anyone may access /pin</option>
</select>
<div class="form-text">
The origin of the remote endpoint address that is not denied for HTTP method /pin
</div>
</div>
<!--External IP-->
<div class="mb-3">
<label for="external_ip" class="form-label">External IP</label>
Expand Down Expand Up @@ -1168,7 +1150,6 @@ <h2 class="accordion-header">
"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",
Expand Down

0 comments on commit 045044e

Please sign in to comment.