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
2025-10-16 08:56:44 +02:00
committed by GitHub
4 changed files with 271 additions and 5 deletions
+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');
}
});
}