芝麻web文件管理V1.00
编辑当前文件:/home/rejoandoctor/www/vendor/biscolab/laravel-recaptcha/src/ReCaptchaBuilderV3.php
getValidationUrl(), $this->getTokenParameterName() ] ); } /** * Write script HTML tag in you HTML code * Insert before tag * * @param array|null $configuration * * @return string */ public function htmlScriptTagJsApi(?array $configuration = []): string { if ($this->skip_by_ip) { return ''; } $html = ""; $action = Arr::get($configuration, 'action', 'homepage'); $js_custom_validation = Arr::get($configuration, 'custom_validation', ''); // Check if set custom_validation. That function will override default fetch validation function if ($js_custom_validation) { $validate_function = ($js_custom_validation) ? "{$js_custom_validation}(token);" : ''; } else { $js_then_callback = Arr::get($configuration, 'callback_then', ''); $js_callback_catch = Arr::get($configuration, 'callback_catch', ''); $js_then_callback = ($js_then_callback) ? "{$js_then_callback}(response)" : ''; $js_callback_catch = ($js_callback_catch) ? "{$js_callback_catch}(err)" : ''; $validate_function = " fetch('" . $this->getValidationUrlWithToken() . "=' + token, { headers: { \"X-Requested-With\": \"XMLHttpRequest\", \"X-CSRF-TOKEN\": csrfToken.content } }) .then(function(response) { {$js_then_callback} }) .catch(function(err) { {$js_callback_catch} });"; } $html .= ""; return $html; } }