Fixed issue where using path parameters but no custom domain breaks#34
Fixed issue where using path parameters but no custom domain breaks#34sloev merged 9 commits intosloev:mastersloev/python-lambdarest:masterfrom svdgraaf:feature/fix-custompath-edgecaseCopy head branch name to clipboard
Conversation
|
I think we need to do some changes to deployment as seen in trustpilot/python-trustpilot#21 |
|
support for python 3.3 removed and all tox removed in |
|
can you rebase on master? @svdgraaf then it should work |
… feature/fix-custompath-edgecase
|
@sloev awesome, checks out :) |
lambdarest/__init__.py
Outdated
| # resource path, which will contain the actual requested path itself. | ||
| # If they are not the same, this is a proxied or custom domain where | ||
| # we need to use the event resource | ||
| if 'path' in event and event['resource'][0:3] == event['path'][0:3]: |
There was a problem hiding this comment.
why do you only check the first 3 letters ? @svdgraaf
There was a problem hiding this comment.
hmmm, no particular reason. I'll change it, and change it for the first part of the url, that's more accurate.
|
Are you gonna fix the code so the test is happy ? 😊 @svdgraaf |
|
@sloev yes, but will be somewhere later this week :) |
|
@sloev done ;) |
|
thanks, can you, @svdgraaf bump the version as well ? , now only in the version.py file, and remember history |
|
on it |
|
I bumped the version to 5.0.1 |
|
sweet |
I just redeployed an api to api gateway without a custom domain, but with path parameters in the url. This broke the parsing. I think this was an edge cased that I missed last time.
This change fixes this issue. It checks if both
pathandresourceare set. If so, it checks if they are the same. If so, it usesresource, if not. It usespath, which will contain all the values for the path parameters.