diff --git a/app/Livewire/Settings/Advanced.php b/app/Livewire/Settings/Advanced.php
index 1edfc9638..be38ae1d8 100644
--- a/app/Livewire/Settings/Advanced.php
+++ b/app/Livewire/Settings/Advanced.php
@@ -85,14 +85,8 @@ public function submit()
// Handle allowed IPs with subnet support and 0.0.0.0 special case
$this->allowed_ips = str($this->allowed_ips)->replaceEnd(',', '')->trim();
- // Check if user entered 0.0.0.0 or left field empty (both allow access from anywhere)
- $allowsFromAnywhere = false;
- if (empty($this->allowed_ips)) {
- $allowsFromAnywhere = true;
- } elseif (in_array('0.0.0.0', array_map('trim', explode(',', $this->allowed_ips)))) {
- $allowsFromAnywhere = true;
- } else {
- // Validate and clean up the entries
+ // Only validate and clean up if we have IPs and it's not 0.0.0.0 (allow all)
+ if (! empty($this->allowed_ips) && ! in_array('0.0.0.0', array_map('trim', explode(',', $this->allowed_ips)))) {
$invalidEntries = [];
$validEntries = str($this->allowed_ips)->trim()->explode(',')->map(function ($entry) use (&$invalidEntries) {
$entry = str($entry)->trim()->toString();
@@ -128,7 +122,6 @@ public function submit()
return;
}
- // Also check if we have no valid entries after filtering
if ($validEntries->isEmpty()) {
$this->dispatch('error', 'No valid IP addresses or subnets provided');
@@ -139,14 +132,6 @@ public function submit()
}
$this->instantSave();
-
- // Show security warning if allowing access from anywhere
- if ($allowsFromAnywhere) {
- $message = empty($this->allowed_ips)
- ? 'Empty IP allowlist allows API access from anywhere.
This is not recommended for production environments!'
- : 'Using 0.0.0.0 allows API access from anywhere.
This is not recommended for production environments!';
- $this->dispatch('warning', $message);
- }
} catch (\Exception $e) {
return handleError($e, $this);
}
diff --git a/resources/views/livewire/settings/advanced.blade.php b/resources/views/livewire/settings/advanced.blade.php
index 65d7181c6..9ee15d17b 100644
--- a/resources/views/livewire/settings/advanced.blade.php
+++ b/resources/views/livewire/settings/advanced.blade.php
@@ -1,77 +1,93 @@