diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php
index 096e18617..9af0c8d8d 100644
--- a/app/Livewire/Project/Application/General.php
+++ b/app/Livewire/Project/Application/General.php
@@ -337,7 +337,12 @@ class General extends Component
return str($domain)->trim()->lower();
});
+
$this->application->fqdn = $this->application->fqdn->unique()->implode(',');
+ $warning = sslipDomainWarning($this->application->fqdn);
+ if ($warning) {
+ $this->dispatch('warning', __('warning.sslipdomain'));
+ }
$this->resetDefaultLabels();
if ($this->application->isDirty('redirect')) {
@@ -403,7 +408,7 @@ class General extends Component
}
$this->application->custom_labels = base64_encode($this->customLabels);
$this->application->save();
- $showToaster && $this->dispatch('success', 'Application settings updated!');
+ $showToaster && ! $warning && $this->dispatch('success', 'Application settings updated!');
} catch (\Throwable $e) {
$originalFqdn = $this->application->getOriginal('fqdn');
if ($originalFqdn !== $this->application->fqdn) {
diff --git a/app/Livewire/Project/Service/EditDomain.php b/app/Livewire/Project/Service/EditDomain.php
index b7ef978a8..e89aeda85 100644
--- a/app/Livewire/Project/Service/EditDomain.php
+++ b/app/Livewire/Project/Service/EditDomain.php
@@ -33,6 +33,10 @@ class EditDomain extends Component
return str($domain)->trim()->lower();
});
$this->application->fqdn = $this->application->fqdn->unique()->implode(',');
+ $warning = sslipDomainWarning($this->application->fqdn);
+ if ($warning) {
+ $this->dispatch('warning', __('warning.sslipdomain'));
+ }
check_domain_usage(resource: $this->application);
$this->validate();
$this->application->save();
@@ -40,7 +44,7 @@ class EditDomain extends Component
if (str($this->application->fqdn)->contains(',')) {
$this->dispatch('warning', 'Some services do not support multiple domains, which can lead to problems and is NOT RECOMMENDED.
Only use multiple domains if you know what you are doing.');
} else {
- $this->dispatch('success', 'Service saved.');
+ ! $warning && $this->dispatch('success', 'Service saved.');
}
$this->application->service->parse();
$this->dispatch('refresh');
diff --git a/app/Livewire/Project/Service/ServiceApplicationView.php b/app/Livewire/Project/Service/ServiceApplicationView.php
index 23caa9f72..fab51d180 100644
--- a/app/Livewire/Project/Service/ServiceApplicationView.php
+++ b/app/Livewire/Project/Service/ServiceApplicationView.php
@@ -30,8 +30,6 @@ class ServiceApplicationView extends Component
'application.is_stripprefix_enabled' => 'nullable|boolean',
];
- public function updatedApplicationFqdn() {}
-
public function instantSave()
{
$this->submit();
@@ -83,7 +81,10 @@ class ServiceApplicationView extends Component
return str($domain)->trim()->lower();
});
$this->application->fqdn = $this->application->fqdn->unique()->implode(',');
-
+ $warning = sslipDomainWarning($this->application->fqdn);
+ if ($warning) {
+ $this->dispatch('warning', __('warning.sslipdomain'));
+ }
check_domain_usage(resource: $this->application);
$this->validate();
$this->application->save();
@@ -91,7 +92,7 @@ class ServiceApplicationView extends Component
if (str($this->application->fqdn)->contains(',')) {
$this->dispatch('warning', 'Some services do not support multiple domains, which can lead to problems and is NOT RECOMMENDED.
Only use multiple domains if you know what you are doing.');
} else {
- $this->dispatch('success', 'Service saved.');
+ ! $warning && $this->dispatch('success', 'Service saved.');
}
$this->dispatch('generateDockerCompose');
} catch (\Throwable $e) {
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 90cec7d69..cd0eb709a 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -3789,7 +3789,6 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
service_name: $serviceName,
image: $image,
predefinedPort: $predefinedPort
-
));
}
}
@@ -4030,3 +4029,15 @@ function loggy($message = null, array $context = [])
return app('log')->debug($message, $context);
}
+function sslipDomainWarning(string $domains)
+{
+ $domains = str($domains)->trim()->explode(',');
+ $showSslipHttpsWarning = false;
+ $domains->each(function ($domain) use (&$showSslipHttpsWarning) {
+ if (str($domain)->contains('https') && str($domain)->contains('sslip')) {
+ $showSslipHttpsWarning = true;
+ }
+ });
+
+ return $showSslipHttpsWarning;
+}
diff --git a/lang/en.json b/lang/en.json
index fa69c7035..5ea474b02 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -33,5 +33,6 @@
"resource.delete_volumes": "Permanently delete all volumes associated with this resource.",
"resource.delete_connected_networks": "Permanently delete all non-predefined networks associated with this resource.",
"resource.delete_configurations": "Permanently delete all configuration files from the server.",
- "database.delete_backups_locally": "All backups will be permanently deleted from local storage."
+ "database.delete_backups_locally": "All backups will be permanently deleted from local storage.",
+ "warning.sslipdomain": "Your configuration is saved, but sslip domain with https is NOT recommended, because Let's Encrypt servers with this public domain are rate limited (SSL certificate validation will fail).
Use your own domain instead."
}
diff --git a/resources/views/livewire/project/service/database.blade.php b/resources/views/livewire/project/service/database.blade.php
index de8b522be..c18473a14 100644
--- a/resources/views/livewire/project/service/database.blade.php
+++ b/resources/views/livewire/project/service/database.blade.php
@@ -17,7 +17,6 @@
label="Image Tag" id="database.image">