change behavior api_token_header

This commit is contained in:
aynsix
2020-08-05 19:57:53 +03:00
parent f6854caaba
commit 2e1ce43321
9 changed files with 88 additions and 15 deletions

View File

@@ -282,7 +282,7 @@ class OAuth2Controller extends Controller
/** @var PropertyAccess $config */
$config = $this->app['conf'];
if ( ! $request->isSecure() && $config->get(['main', 'api_require_ssl'], true) == true) {
if ( ! $request->isSecure() && $config->get(['registry', 'api-clients', 'api_require_ssl'], true) == true) {
throw new HttpException(400, 'This route requires the use of the https scheme: ' . $config->get(['main', 'api_require_ssl']), null, ['content-type' => 'application/json']);
}