CORSMiddleware does not appear to read from global settings
russelltsherman opened this issue · comments
the CORS middleware class does not appear to be reading and applying global settings in the expected manner.
for requests to be allowed in my docker environment i have to edit the CORS middleware class in the following manner
setting the default for profiles_url and secure_url to reflect the local environment.
these defaults are set in the global config file.. and are applied properly in other contexts..
i don't understand why it's not working properly in this context
class CORSMiddleware
{
protected $container;
protected $allowedOrigins;
public function __construct($c)
{
$settings = \Settings::getInstance();
$this->container = $c;
$this->allowedOrigins = array(
$settings->getGlobalSetting('www_url', 'https://www.burningflipside.com'),
$settings->getGlobalSetting('wiki_url', 'https://wiki.burningflipside.com'),
$settings->getGlobalSetting('profiles_url', 'https://localhost:3300'),
$settings->getGlobalSetting('secure_url', 'https://localhost:3400')
);
}