Merge pull request #6889 from coollabsio/andrasbacsai/fix-host-header-injection

feat: implement TrustHosts middleware to handle FQDN and IP address trust logic
This commit is contained in:
Andras Bacsai authored and GitHub committed 2025-10-16 08:56:44 +02:00
commit 47916e1b1d
4 files changed
+271 -5

No files matched your search

+6 -1
View File
@@ -35,13 +35,18 @@ class InstanceSettings extends Model
protected static function booted(): void
{
static::updated(function ($settings) {
if ($settings->isDirty('helper_version')) {
if ($settings->wasChanged('helper_version')) {
Server::chunkById(100, function ($servers) {
foreach ($servers as $server) {
PullHelperImageJob::dispatch($server);
}
});
}
// Clear trusted hosts cache when FQDN changes
if ($settings->wasChanged('fqdn')) {
\Cache::forget('instance_settings_fqdn_host');
}
});
}