Content-Length: 319772 | pFad | http://github.com/Moesif/moesif-aws-lambda-python/commit/7f7e3b77ec822ff6c25a6f5877cd201b926c9f7d

B9 Fix: Request URI · Moesif/moesif-aws-lambda-python@7f7e3b7 · GitHub
Skip to content

Commit 7f7e3b7

Browse files
author
Keyur
committed
Fix: Request URI
Fix: Request URI Add: direction field to event Refactor: requirements.txt to install specific version Bump version to 1.0.4
1 parent 3c6b4cf commit 7f7e3b7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

moesif_aws_lambda/middleware.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_company_id(self, event, context):
7676

7777
def build_uri(self, event):
7878

79-
uri = event['headers'].get('X-Forwarded-Proto', event['headers'].get('x-forwarded-proto', 'http://')) + event['headers'].get('Host', event['headers'].get('host', 'localhost')) + event.get('path', '/')
79+
uri = event['headers'].get('X-Forwarded-Proto', event['headers'].get('x-forwarded-proto', 'http')) + '://' + event['headers'].get('Host', event['headers'].get('host', 'localhost')) + event.get('path', '/')
8080

8181
if event.get('multiValueQueryStringParameters', {}):
8282
uri = uri + '?' + urlencode(event['multiValueQueryStringParameters'], doseq=True)
@@ -261,6 +261,9 @@ def after(self, retval):
261261
if self.DEBUG:
262262
print("MOESIF Having difficulty executing skip_event function. Please check moesif settings.")
263263

264+
# Add direction field
265+
event_model.direction = "Incoming"
266+
264267
# Send event to Moesif
265268
if self.DEBUG:
266269
print('Moesif Event Model:')

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
moesifapi
2-
lambda_decorators
1+
moesifapi==1.3.2
2+
lambda_decorators==0.3.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Versions should comply with PEP440. For a discussion on single-sourcing
2929
# the version across setup.py and the project code, see
3030
# https://packaging.python.org/en/latest/single_source_version.html
31-
version='1.0.3',
31+
version='1.0.4',
3232

3333
description='Moesif Middleware to automatically log API calls from AWS Lambda functions',
3434
long_description=long_description,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Moesif/moesif-aws-lambda-python/commit/7f7e3b77ec822ff6c25a6f5877cd201b926c9f7d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy