diff --git a/.gitignore b/.gitignore index 6458019..eb9ab39 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,5 @@ fabric.properties # modules.xml # .idea/misc.xml # *.ipr +**/Pipfile +**/Pipfile.lock diff --git a/moesifasgi/middleware.py b/moesifasgi/middleware.py index 62eb106..2c15083 100644 --- a/moesifasgi/middleware.py +++ b/moesifasgi/middleware.py @@ -88,7 +88,7 @@ def schedule_config_job(self): def initialize_config(self): Configuration.BASE_URI = self.settings.get("BASE_URI", "https://api.moesif.net") - Configuration.version = 'moesifasgi-python/1.0.8' + Configuration.version = 'moesifasgi-python/1.0.9' self.LOG_BODY = self.settings.get("LOG_BODY", True) self.app_config = AppConfig() @@ -233,7 +233,7 @@ async def dispatch(self, request, call_next): # we must fire these hooks early. user_id = await self.logger_helper.get_user_id(self.settings, request, None, dict(request.headers), self.DEBUG) company_id = await self.logger_helper.get_company_id(self.settings, request, None, self.DEBUG) - governed_response = self.config.govern_request(event_req, user_id, company_id, event_req.body) + governed_response = self.config.govern_request(event_req, user_id, company_id, event_req.body, request_headers) blocked_by = None if 'blocked_by' in governed_response: diff --git a/requirements.txt b/requirements.txt index 27e9116..2df30c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ nose>=1.3.7 -moesifapi>=1.5.1 -moesifpythonrequest>=0.3.3 +moesifapi>=1.5.3 +moesifpythonrequest>=0.3.4 starlette>=0.16.0 diff --git a/setup.py b/setup.py index 0b74d51..c0f13d9 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='1.0.8', + version='1.0.9', description='Moesif Middleware for Python ASGI based platforms (FastAPI & Others)', long_description=long_description, @@ -81,7 +81,7 @@ # your project is installed. For an analysis of "install_requires" vs pip's # requirements files see: # https://packaging.python.org/en/latest/requirements.html - install_requires=['starlette>=0.16.0', 'moesifapi>=1.5.0', 'moesifpythonrequest>=0.3.3'], + install_requires=['starlette>=0.16.0', 'moesifapi>=1.5.3', 'moesifpythonrequest>=0.3.4'], # List additional groups of dependencies here (e.g. development # dependencies). You can install these using the following syntax,