From 811438c5fdaf8190d9389fada96f2ea30de5ba7e Mon Sep 17 00:00:00 2001 From: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Thu, 7 Nov 2024 04:49:45 +0000 Subject: [PATCH] Default to 8443 if https --- app/Filament/Resources/NodeResource/Pages/CreateNode.php | 2 +- app/Filament/Resources/NodeResource/Pages/EditNode.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Filament/Resources/NodeResource/Pages/CreateNode.php b/app/Filament/Resources/NodeResource/Pages/CreateNode.php index c8d9bbc30a..4d2d51c7ab 100644 --- a/app/Filament/Resources/NodeResource/Pages/CreateNode.php +++ b/app/Filament/Resources/NodeResource/Pages/CreateNode.php @@ -140,7 +140,7 @@ public function form(Forms\Form $form): Forms\Form ->helperText('If you are running the daemon behind Cloudflare you should set the daemon port to 8443 to allow websocket proxying over SSL.') ->minValue(1) ->maxValue(65535) - ->default(8080) + ->default(request()->isSecure() ? 8443 : 8080) ->required() ->integer(), diff --git a/app/Filament/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Resources/NodeResource/Pages/EditNode.php index b5f3804e1e..23306b4f49 100644 --- a/app/Filament/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Resources/NodeResource/Pages/EditNode.php @@ -159,7 +159,7 @@ public function form(Forms\Form $form): Forms\Form ->helperText('If you are running the daemon behind Cloudflare you should set the daemon port to 8443 to allow websocket proxying over SSL.') ->minValue(1) ->maxValue(65535) - ->default(8080) + ->default(request()->isSecure() ? 8443 : 8080) ->required() ->integer(), TextInput::make('name')