mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-06 04:01:58 +02:00
- Remove ReCaptcha support and all related files
- Adds support for the following captchas
- Cloudflare Turnstile
- Hcaptcha
- Friendly Captcha
- Implement new captcha middleware and controller
- Add frontend components for new captcha options
- Update settings configuration and views
Closes #169
45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Admin\Settings;
|
|
|
|
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|
|
|
class AdvancedSettingsFormRequest extends AdminFormRequest
|
|
{
|
|
/**
|
|
* Return all the rules to apply to this request's data.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60',
|
|
'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60',
|
|
'pterodactyl:client_features:allocations:enabled' => 'required|in:true,false',
|
|
'pterodactyl:client_features:allocations:range_start' => [
|
|
'nullable',
|
|
'required_if:pterodactyl:client_features:allocations:enabled,true',
|
|
'integer',
|
|
'between:1024,65535',
|
|
],
|
|
'pterodactyl:client_features:allocations:range_end' => [
|
|
'nullable',
|
|
'required_if:pterodactyl:client_features:allocations:enabled,true',
|
|
'integer',
|
|
'between:1024,65535',
|
|
'gt:pterodactyl:client_features:allocations:range_start',
|
|
],
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'pterodactyl:guzzle:timeout' => 'HTTP Request Timeout',
|
|
'pterodactyl:guzzle:connect_timeout' => 'HTTP Connection Timeout',
|
|
'pterodactyl:client_features:allocations:enabled' => 'Auto Create Allocations Enabled',
|
|
'pterodactyl:client_features:allocations:range_start' => 'Starting Port',
|
|
'pterodactyl:client_features:allocations:range_end' => 'Ending Port',
|
|
];
|
|
}
|
|
}
|