2022-03-14 19:13:10 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Config;
|
|
|
|
|
|
|
|
use CodeIgniter\Config\BaseConfig;
|
|
|
|
|
|
|
|
class Honeypot extends BaseConfig
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Makes Honeypot visible or not to human
|
|
|
|
*/
|
2024-04-07 22:17:30 +02:00
|
|
|
public bool $hidden = true;
|
2022-03-14 19:13:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Honeypot Label Content
|
|
|
|
*/
|
2024-04-07 22:17:30 +02:00
|
|
|
public string $label = 'Fill This Field';
|
2022-03-14 19:13:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Honeypot Field Name
|
|
|
|
*/
|
2024-04-07 22:17:30 +02:00
|
|
|
public string $name = 'honeypot';
|
2022-03-14 19:13:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Honeypot HTML Template
|
|
|
|
*/
|
2024-04-07 22:17:30 +02:00
|
|
|
public string $template = '<label>{label}</label><input type="text" name="{name}" value="">';
|
2022-03-14 19:13:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Honeypot container
|
|
|
|
*
|
2024-04-07 22:17:30 +02:00
|
|
|
* If you enabled CSP, you can remove `style="display:none"`.
|
|
|
|
*/
|
|
|
|
public string $container = '<div style="display:none">{template}</div>';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The id attribute for Honeypot container tag
|
|
|
|
*
|
|
|
|
* Used when CSP is enabled.
|
2022-03-14 19:13:10 +01:00
|
|
|
*/
|
2024-04-07 22:17:30 +02:00
|
|
|
public string $containerId = 'hpc';
|
2022-03-14 19:13:10 +01:00
|
|
|
}
|