Merge "Add kwargs to WsgiMiddleware __init__"
This commit is contained in:
commit
3370658fb3
|
@ -69,7 +69,7 @@ def enable(hmac_keys=None):
|
|||
class WsgiMiddleware(object):
|
||||
"""WSGI Middleware that enables tracing for an application."""
|
||||
|
||||
def __init__(self, application, hmac_keys=None, enabled=False):
|
||||
def __init__(self, application, hmac_keys=None, enabled=False, **kwargs):
|
||||
"""Initialize middleware with api-paste.ini arguments.
|
||||
|
||||
:application: wsgi app
|
||||
|
@ -79,6 +79,10 @@ class WsgiMiddleware(object):
|
|||
by only those who knows this key which helps
|
||||
avoid DDOS.
|
||||
:enabled: This middleware can be turned off fully if enabled is False.
|
||||
:kwargs: Other keyword arguments.
|
||||
NOTE(tovin07): Currently, this `kwargs` is not used at all.
|
||||
It's here to avoid some extra keyword arguments in local_conf
|
||||
that cause `__init__() got an unexpected keyword argument`.
|
||||
"""
|
||||
self.application = application
|
||||
self.name = "wsgi"
|
||||
|
|
Loading…
Reference in New Issue