fix: 支援 Port 8081 直接訪問租戶 (IP-based tenancy support)
This commit is contained in:
@@ -17,7 +17,8 @@ class LoginController extends Controller
|
||||
{
|
||||
$centralDomains = config('tenancy.central_domains', []);
|
||||
|
||||
if (in_array(request()->getHost(), $centralDomains)) {
|
||||
// [Hack] Demo 環境特殊規則:Port 8081 強制視為租戶
|
||||
if (request()->getPort() != 8081 && in_array(request()->getHost(), $centralDomains)) {
|
||||
return Inertia::render('Landlord/Auth/Login');
|
||||
}
|
||||
|
||||
@@ -43,7 +44,9 @@ class LoginController extends Controller
|
||||
$request->session()->regenerate();
|
||||
|
||||
$centralDomains = config('tenancy.central_domains', []);
|
||||
if (in_array($request->getHost(), $centralDomains)) {
|
||||
$centralDomains = config('tenancy.central_domains', []);
|
||||
// [Hack] Demo 環境特殊規則:Port 8081 強制視為租戶
|
||||
if ($request->getPort() != 8081 && in_array($request->getHost(), $centralDomains)) {
|
||||
return redirect()->intended(route('landlord.dashboard'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user