Add the possibility to pass API token as environment variable for Docker container

This commit is contained in:
Frederic Guillot
2017-05-12 17:18:56 -04:00
parent 3cf9484644
commit 5e32f55138
4 changed files with 12 additions and 4 deletions

View File

@@ -78,6 +78,10 @@ class AuthenticationMiddleware extends Base implements MiddlewareInterface
return API_AUTHENTICATION_TOKEN;
}
if (getenv('API_AUTHENTICATION_TOKEN')) {
return getenv('API_AUTHENTICATION_TOKEN');
}
return $this->configModel->get('api_token');
}
}