- Add a config whitelist
- Send the config values to the frontend - Add a service class for exposing the config values - Change the directives to inject both Features and Config - Change directive users to make use of the new scope
This commit is contained in:
parent
265fa5070a
commit
da859203f7
9 changed files with 76 additions and 46 deletions
|
@ -16,6 +16,7 @@ from auth import scopes
|
|||
from endpoints.api.discovery import swagger_route_data
|
||||
from werkzeug.routing import BaseConverter
|
||||
from functools import wraps
|
||||
from config import getFrontendVisibleConfig
|
||||
|
||||
import features
|
||||
|
||||
|
@ -119,6 +120,9 @@ def random_string():
|
|||
def render_page_template(name, **kwargs):
|
||||
resp = make_response(render_template(name, route_data=json.dumps(get_route_data()),
|
||||
feature_set=json.dumps(features.get_features()),
|
||||
config_set=json.dumps(getFrontendVisibleConfig(app.config)),
|
||||
mixpanel_key=app.config.get('MIXPANEL_KEY', ''),
|
||||
is_debug=str(app.config.get('DEBUGGING', False)).lower(),
|
||||
cache_buster=random_string(),
|
||||
**kwargs))
|
||||
|
||||
|
|
Reference in a new issue