fix(legacy): improve error messages and logs
This commit is contained in:
parent
1e6c5a84d3
commit
c34f02d916
3 changed files with 10 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue