1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-08 23:39:46 +01:00

allow customization of securimage by captcha config variable

This commit is contained in:
fowr 2025-01-09 14:57:31 -03:00
parent 50339812b6
commit 0deae76002
2 changed files with 5 additions and 2 deletions

View File

@ -390,7 +390,10 @@
// Custom captcha extra field (eg. charset)
'extra' => 'abcdefghijklmnopqrstuvwxyz',
// New thread captcha. Require solving a captcha to post a thread.
'new_thread_capt' => false
'new_thread_capt' => false,
// Securimage customization options
// https://github.com/dapphp/securimage/blob/nextgen/examples/securimage_show_example.php#L49
'securimage_options' => ['send_headers' => false, 'no_exit' => true]
]
];

View File

@ -22,7 +22,7 @@ switch ($mode) {
header("Content-type: application/json");
$extra = $config['captcha']['native']['extra'];
$cookie = rand_string(20, $extra);
$i = new Securimage(['send_headers' => false, 'no_exit' => true]);
$i = new Securimage($config['captcha']['native']['securimage_options']);
$i->createCode();
ob_start();
$i->show();