Closed
Description
For example when using Flask-Talisman you can specify per-view options using:
@functions_framework.http
@talisman(content_security_policy=None)
def foo(request):
...
Talisman will decorate the view function with a talisman_view_options
attribute which is retrieved later like this:
view_options = getattr(view_function, 'talisman_view_options', {})
Adding functools.wraps
makes sure all function attributes are copied from the original function to the _http_view_func_wrapper
.
Will create a pull request for this in a minute.
Metadata
Metadata
Assignees
Labels
No labels