Skip to content

Commit

Permalink
fix: options endpoint does not invoke lambda (aws#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Leigh authored and douglasnaphas committed Dec 9, 2019
1 parent fab0465 commit 3d31754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samcli/local/apigw/local_apigw_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _request_handler(self, **kwargs):
cors_headers = Cors.cors_to_headers(self.api.cors)

method, _ = self.get_request_methods_endpoints(request)
if method == "OPTIONS":
if method == "OPTIONS" and method not in route.methods:
headers = Headers(cors_headers)
return self.service_response("", headers, 200)

Expand Down

0 comments on commit 3d31754

Please sign in to comment.