Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

remove instance wide wildcard domain

Andras Bacsai13a08ebbe1bf
diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php
index 217ccb47e2..9e901519da 100644
--- a/app/Http/Livewire/Settings/Configuration.php
+++ b/app/Http/Livewire/Settings/Configuration.php
@@ -20,20 +20,19 @@ class Configuration extends Component
protected $rules = [
'settings.fqdn' => 'nullable',
- 'settings.wildcard_domain' => 'nullable',
'settings.public_port_min' => 'required',
'settings.public_port_max' => 'required',
'settings.default_redirect_404' => 'nullable',
];
protected $validationAttributes = [
'settings.fqdn' => 'FQDN',
- 'settings.wildcard_domain' => 'Wildcard domain',
'settings.public_port_min' => 'Public port min',
'settings.public_port_max' => 'Public port max',
'settings.default_redirect_404' => 'Default redirect 404',
];
public function mount()
{
+ ray($this->settings);
$this->do_not_track = $this->settings->do_not_track;
$this->is_auto_update_enabled = $this->settings->is_auto_update_enabled;
$this->is_registration_enabled = $this->settings->is_registration_enabled;
@@ -108,67 +107,6 @@ class Configuration extends Component
$this->save_configuration_to_disk($traefik_dynamic_conf, $file);
}
}
- private function setup_default_redirect_404()
- {
- $file = "$this->dynamic_config_path/default_redirect_404.yaml";
-
- if (empty($this->settings->default_redirect_404)) {
- remote_process([
- "rm -f $file",
- ], $this->server);
- } else {
- $traefik_dynamic_conf = [
- 'http' =>
- [
- 'routers' =>
- [
- 'catchall' =>
- [
- 'entryPoints' => [
- 0 => 'http',
- 1 => 'https',
- ],
- 'service' => 'noop',
- 'rule' => "HostRegexp(`{catchall:.*}`)",
- 'priority' => 1,
- 'middlewares' => [
- 0 => 'redirect-regexp@file',
- ],
- ],
- ],
- 'services' =>
- [
- 'noop' =>
- [
- 'loadBalancer' =>
- [
- 'servers' =>
- [
- 0 =>
- [
- 'url' => '',
- ],
- ],
- ],
- ],
- ],
- 'middlewares' =>
- [
- 'redirect-regexp' =>
- [
- 'redirectRegex' =>
- [
- 'regex' => '(.*)',
- 'replacement' => $this->settings->default_redirect_404,
- 'permanent' => false,
- ],
- ],
- ],
- ],
- ];
- $this->save_configuration_to_disk($traefik_dynamic_conf, $file);
- }
- }
private function save_configuration_to_disk(array $traefik_dynamic_conf, string $file)
{
$yaml = Yaml::dump($traefik_dynamic_conf, 12, 2);
diff --git a/config/version.php b/config/version.php
index 3854d4e30b..8c76956cb4 100644
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
<?php
-return '4.0.0-beta.8';
+return '4.0.0-beta.9';
diff --git a/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php b/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php
new file mode 100644
index 0000000000..e98ef529ac
--- /dev/null
+++ b/database/migrations/2023_06_23_084605_remove_wildcard_domain_from_instancesettings.php
@@ -0,0 +1,28 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('instance_settings', function (Blueprint $table) {
+ $table->dropColumn('wildcard_domain');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('instancesettings', function (Blueprint $table) {
+ $table->string('wildcard_domain')->nullable();
+ });
+ }
+};
diff --git a/resources/views/livewire/settings/configuration.blade.php b/resources/views/livewire/settings/configuration.blade.php
index 306aadf73d..d17435699f 100644
--- a/resources/views/livewire/settings/configuration.blade.php
+++ b/resources/views/livewire/settings/configuration.blade.php
@@ -9,8 +9,6 @@
<div class="flex flex-col gap-2">
<div class="flex gap-2">
<x-forms.input id="settings.fqdn" label="Coolify's Domain" />
- <x-forms.input id="settings.wildcard_domain" label="Wildcard Domain"
- helper="Wildcard domain for your applications. If you set this, you will get a random generated domain for your new applications.<br><span class='font-bold text-white'>Example</span>In case you set:<span class='text-helper'>https://example.com</span>your applications will get: <span class='text-helper'>https://randomId.example.com</span>" />
<x-forms.input id="settings.default_redirect_404" label="Default Redirect 404"
helper="All urls that has no service available will be redirected to this domain.<span class='text-helper'>You can set to your main marketing page or your social media link.</span>" />
</div>
diff --git a/versions.json b/versions.json
index 2c5b3687ae..153307ec03 100644
--- a/versions.json
+++ b/versions.json
@@ -4,7 +4,7 @@
"version": "3.12.32"
},
"v4": {
- "version": "4.0.0-beta.8"
+ "version": "4.0.0-beta.9"
}
}
}
\ No newline at end of file