refactor: simplify TrustHosts middleware and use APP_URL as base_url fallback

- Delegate host validation to parent class instead of custom implementation
- Update base_url() helper to use config('app.url') instead of url('/')
- Add test for APP_URL fallback when no FQDN or public IPs configured
- Remove dedicated TrustHostsMiddlewareTest (logic now tested via integration tests)
This commit is contained in:
Andras Bacsai
2026-03-28 12:12:48 +01:00
parent ba6f0cdb38
commit e396c70903
4 changed files with 27 additions and 545 deletions
+1 -1
View File
@@ -491,7 +491,7 @@ function base_url(bool $withPort = true): string
return "http://[$settings->public_ipv6]";
}
return url('/');
return config('app.url');
}
function isSubscribed()