mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-06 22:21:45 +00:00
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:
@@ -491,7 +491,7 @@ function base_url(bool $withPort = true): string
|
||||
return "http://[$settings->public_ipv6]";
|
||||
}
|
||||
|
||||
return url('/');
|
||||
return config('app.url');
|
||||
}
|
||||
|
||||
function isSubscribed()
|
||||
|
||||
Reference in New Issue
Block a user