feat(legacy): remove db allowed_cors_origins preference (#2095)
- Remove after deprecation in eb8e7b3415
This commit is contained in:
parent
e54c8d22e1
commit
cff98f2d23
7 changed files with 28 additions and 60 deletions
|
@ -27,27 +27,6 @@ class CORSHelper
|
|||
*/
|
||||
public static function getAllowedOrigins($request)
|
||||
{
|
||||
$config = Config::getConfig();
|
||||
|
||||
return array_merge(
|
||||
$config['allowedCorsOrigins'],
|
||||
self::getDatabaseAllowedOrigins()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get database allowed origins.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private static function getDatabaseAllowedOrigins()
|
||||
{
|
||||
return array_map(
|
||||
'trim',
|
||||
explode(
|
||||
PHP_EOL,
|
||||
Application_Model_Preference::GetAllowedCorsUrls()
|
||||
)
|
||||
);
|
||||
return Config::get('general.allowed_cors_origins');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue