feat: move allowed cors url to configuration file
- don't set cors origins form field as readonly and add deprecation notice.
This commit is contained in:
parent
510e978952
commit
eb8e7b3415
5 changed files with 63 additions and 26 deletions
|
@ -44,6 +44,10 @@ class Config
|
|||
$CC_CONFIG['basePort'] = $port;
|
||||
$CC_CONFIG['baseDir'] = $path;
|
||||
|
||||
// Allowed hosts
|
||||
$CC_CONFIG['allowedCorsOrigins'] = $values['general']['allowed_cors_origins'] ?? [];
|
||||
$CC_CONFIG['allowedCorsOrigins'][] = strval($public_url->withPath(''));
|
||||
|
||||
$CC_CONFIG['dev_env'] = $values['general']['dev_env'] ?? 'production';
|
||||
$CC_CONFIG['auth'] = $values['general']['auth'] ?? 'local';
|
||||
$CC_CONFIG['cache_ahead_hours'] = $values['general']['cache_ahead_hours'] ?? 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue