From be5662200076c38f6a7bc70b5fc2be18c70cbb76 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Thu, 21 Sep 2023 00:20:44 +0200 Subject: [PATCH] Add public REST endpoint option to Advanced Settings (#9) --- logic/disk.js | 7 +++++++ ui/src/components/AdvancedSettingsModal.vue | 22 +++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/logic/disk.js b/logic/disk.js index c2e4056..72b3d3b 100644 --- a/logic/disk.js +++ b/logic/disk.js @@ -15,6 +15,7 @@ const DEFAULT_ADVANCED_SETTINGS = { incomingConnections: false, cacheSizeMB: 450, mempoolFullRbf: false, + rest: false, prune: { enabled: false, pruneSizeGB: 300, @@ -108,6 +109,12 @@ function settingsToMultilineConfString(settings) { umbrelBitcoinConfig.push('mempoolfullrbf=1'); } + // rest + if (settings.rest) { + umbrelBitcoinConfig.push("# Enable public REST endpoints."); + umbrelBitcoinConfig.push('rest=1'); + } + // prune if (settings.prune.enabled) { umbrelBitcoinConfig.push("# Reduce disk space requirements to this many MiB by enabling pruning (deleting) of old blocks. This mode is incompatible with -txindex and -coinstatsindex. WARNING: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, greater than or equal to 550 = automatically prune blocks to stay under target size in MiB)."); diff --git a/ui/src/components/AdvancedSettingsModal.vue b/ui/src/components/AdvancedSettingsModal.vue index 84b2c70..fff742c 100644 --- a/ui/src/components/AdvancedSettingsModal.vue +++ b/ui/src/components/AdvancedSettingsModal.vue @@ -187,6 +187,28 @@
+
+
+
+ +
+
+ +
+
+ + Enable public REST endpoints. + +
+ +