Skip to content

Commit

Permalink
Add behind proxy & ignore panel config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
RMartinOscar committed Jan 15, 2025
1 parent 52984e2 commit 0147888
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,22 @@ public function form(Forms\Form $form): Forms\Form
'http' => 'tabler-lock-open-off',
'https' => 'tabler-lock',
])
->default(fn () => request()->isSecure() ? 'https' : 'http'), ]),
->default(fn () => request()->isSecure() ? 'https' : 'http'),
ToggleButtons::make('behind_proxy')
->helperText('If you are running the daemon behind a proxy such as Cloudflare, select this to have the daemon skip looking for certificates on boot.')
->inline()
->default(false)
->live()
->options([
false => 'No',
true => 'Yes',
])
->colors([
false => 'danger',
true => 'primary',
])
->columnSpan(1),
]),
Tab::make('Advanced Settings')
->columns([
'default' => 1,
Expand Down Expand Up @@ -510,7 +525,7 @@ public function form(Forms\Form $form): Forms\Form
Textarea::make('config')
->label('/etc/pelican/config.yml')
->disabled()
->rows(19)
->rows(20)
->hintAction(CopyAction::make())
->columnSpanFull(),
Grid::make()
Expand Down
1 change: 1 addition & 0 deletions app/Models/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public function getConfiguration(): array
],
'allowed_mounts' => $this->mounts->pluck('source')->toArray(),
'remote' => route('filament.app.resources...index'),
'ignore_panel_config_updates' => $this->behind_proxy,
];
}

Expand Down

0 comments on commit 0147888

Please sign in to comment.