fix(legacy): improve error messages and logs

This commit is contained in:
jo 2023-02-01 20:11:00 +01:00 committed by Kyle Robbertze
parent 1e6c5a84d3
commit c34f02d916
3 changed files with 10 additions and 2 deletions

View file

@ -10,7 +10,9 @@ class CORSHelper
if (!($origin == '' || preg_match('/https?:\/\/localhost/', $origin) === 1 || in_array($origin, $allowedOrigins))) {
// Don't allow CORS from other domains to prevent XSS.
Logging::error("request origin '{$origin}' is not in allowed '" . implode(', ', $allowedOrigins) . "'!");
Logging::error(
"request origin '{$origin}' is not in the configured 'allowed_cors_origins' '" . implode(', ', $allowedOrigins) . "'"
);
throw new Zend_Controller_Action_Exception('Forbidden', 403);
}