Repository navigation
fix: Options requests not invoking Local Lambda - #468
Merged
Merged
Conversation
Flask will automagically add a OPTIONS to a route if OPTIONS is not provided in the list of HTTP Verbs on a url rule. Since we add a new url rule for each path + HTTP Verb, Flask was adding OPTIONS to every path. This causes some paths to not execute the Local Lambda code when calling a path with an OPTIONS verb. We turn off this behavior by turning off the feature through provide_automatic_options.
|
I'm pretty sure this regressed somehow :/ |
|
I've just hit this issue as well. I have logic within my lamba to deal with some cors and set cors against the globals -> api but soon as i try to do a options request it fails with a 403 before it gets near the lambda. |
Contributor
Author
|
@paulmowat I reopened #400 20 days ago and asked for a template so we can debug and figure out what else is the error. It seems this was not enough and something else is playing into Flask not resolving the correct handler to call. I have a hunch but need something I can reproduce with. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flask will automagically add a OPTIONS to a route if OPTIONS is not provided
in the list of HTTP Verbs on a url rule. Since we add a new url rule for each
path + HTTP Verb, Flask was adding OPTIONS to every path. This causes some
paths to not execute the Local Lambda code when calling a path with an OPTIONS
verb. We turn off this behavior by turning off the feature through provide_automatic_options.
Issue #, if available:
#400
Description of changes:
See above commit message
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.