mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Changes auto-committed by Conductor
This commit is contained in:
@@ -30,6 +30,12 @@ class TrustHosts extends Middleware
|
|||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip host validation if no FQDN is configured (initial setup)
|
||||||
|
$fqdnHost = Cache::get('instance_settings_fqdn_host');
|
||||||
|
if ($fqdnHost === '' || $fqdnHost === null) {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
|
||||||
// For all other routes, use parent's host validation
|
// For all other routes, use parent's host validation
|
||||||
return parent::handle($request, $next);
|
return parent::handle($request, $next);
|
||||||
}
|
}
|
||||||
@@ -69,6 +75,19 @@ class TrustHosts extends Middleware
|
|||||||
$trustedHosts[] = $fqdnHost;
|
$trustedHosts[] = $fqdnHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trust the APP_URL host itself (not just subdomains)
|
||||||
|
$appUrl = config('app.url');
|
||||||
|
if ($appUrl) {
|
||||||
|
try {
|
||||||
|
$appUrlHost = parse_url($appUrl, PHP_URL_HOST);
|
||||||
|
if ($appUrlHost && ! in_array($appUrlHost, $trustedHosts, true)) {
|
||||||
|
$trustedHosts[] = $appUrlHost;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// Ignore parse errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Trust all subdomains of APP_URL as fallback
|
// Trust all subdomains of APP_URL as fallback
|
||||||
$trustedHosts[] = $this->allSubdomainsOfApplicationUrl();
|
$trustedHosts[] = $this->allSubdomainsOfApplicationUrl();
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template x-for="option in (filteredOptions || [])" :key="option.value">
|
<template x-for="(option, index) in (filteredOptions || [])" :key="option?.value || index">
|
||||||
<div @click="toggleOption(option.value)"
|
<div @click="toggleOption(option.value)"
|
||||||
class="px-3 py-2 cursor-pointer hover:bg-neutral-100 dark:hover:bg-coolgray-200 flex items-center gap-3"
|
class="px-3 py-2 cursor-pointer hover:bg-neutral-100 dark:hover:bg-coolgray-200 flex items-center gap-3"
|
||||||
:class="{ 'bg-neutral-50 dark:bg-coolgray-300': isSelected(option.value) }">
|
:class="{ 'bg-neutral-50 dark:bg-coolgray-300': isSelected(option.value) }">
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template x-for="option in (filteredOptions || [])" :key="option.value">
|
<template x-for="(option, index) in (filteredOptions || [])" :key="option?.value || index">
|
||||||
<div @click="selectOption(option.value)"
|
<div @click="selectOption(option.value)"
|
||||||
class="px-3 py-2 cursor-pointer hover:bg-neutral-100 dark:hover:bg-coolgray-200"
|
class="px-3 py-2 cursor-pointer hover:bg-neutral-100 dark:hover:bg-coolgray-200"
|
||||||
:class="{ 'bg-neutral-50 dark:bg-coolgray-300': selected == option.value }">
|
:class="{ 'bg-neutral-50 dark:bg-coolgray-300': selected == option.value }">
|
||||||
|
|||||||
Reference in New Issue
Block a user