mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 23:54:44 +02:00
Better account for ip addresses
This commit is contained in:
parent
e634dd81b1
commit
a7d8f3b79f
@ -29,10 +29,23 @@ class CreateNode extends CreateRecord
|
|||||||
->rule('prohibited', fn ($state) => is_ip($state) && request()->isSecure())
|
->rule('prohibited', fn ($state) => is_ip($state) && request()->isSecure())
|
||||||
->label(fn ($state) => is_ip($state) ? 'IP Address' : 'Domain Name')
|
->label(fn ($state) => is_ip($state) ? 'IP Address' : 'Domain Name')
|
||||||
->placeholder(fn ($state) => is_ip($state) ? '192.168.1.1' : 'node.example.com')
|
->placeholder(fn ($state) => is_ip($state) ? '192.168.1.1' : 'node.example.com')
|
||||||
->helperText(fn ($state) => is_ip($state) && request()->isSecure() ? '
|
->helperText(function ($state) {
|
||||||
Your panel is currently secured via an SSL certificate and that means your nodes require one too.
|
if (is_ip($state)) {
|
||||||
You must use a domain name, because you cannot get SSL certificates for IP Addresses'
|
if (request()->isSecure()) {
|
||||||
: '')
|
return '
|
||||||
|
Your panel is currently secured via an SSL certificate and that means your nodes require one too.
|
||||||
|
You must use a domain name, because you cannot get SSL certificates for IP Addresses
|
||||||
|
';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return "
|
||||||
|
This is the domain name that points to your node's IP Address.
|
||||||
|
If you've already set up this, you can verify it by checking the next field!
|
||||||
|
";
|
||||||
|
})
|
||||||
->hintColor('danger')
|
->hintColor('danger')
|
||||||
->hint(function ($state) {
|
->hint(function ($state) {
|
||||||
if (is_ip($state) && request()->isSecure()) {
|
if (is_ip($state) && request()->isSecure()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user