Skip to content

Commit 1667a76

Browse files
Added back feature flag injection entry point logic as a comment
1 parent 576fbad commit 1667a76

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,20 @@ def add_security_headers(response):
196196
def inject_is_api_down():
197197
return {"is_api_down": is_api_down()}
198198

199+
# @application.context_processor
200+
# def inject_feature_flags():
201+
# this is where feature flags can be easily added as a dictionary within context
202+
# feature_socket_enabled = application.config.get("FEATURE_SOCKET_ENABLED", True)
203+
204+
# current_app.logger.info(
205+
# f"FEATURE_SOCKET_ENABLED value in __init__.py coming \
206+
# from config is {application.config.get('FEATURE_SOCKET_ENABLED')} and \
207+
# the ending value is {feature_socket_enabled}"
208+
# )
209+
# return dict(
210+
# FEATURE_SOCKET_ENABLED=feature_socket_enabled,
211+
# )
212+
199213
@application.context_processor
200214
def inject_initial_signin_url():
201215
ttl = 24 * 60 * 60

0 commit comments

Comments
 (0)