We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68a2376 commit cf39a38Copy full SHA for cf39a38
api.py
@@ -2,9 +2,9 @@
2
app = Flask(__name__)
3
4
5
-@app.route("/cats")
+@app.route("/")
6
def cats():
7
- return "Cats"
+ return "aws-lambda-python"
8
9
@app.route("/dogs/<id>")
10
def dog(id):
serverless.yml
@@ -6,6 +6,8 @@ provider:
region: us-west-2
deploymentBucket:
name: infra.opszero.com
+ httpApi:
+ cors: true
11
# iamRoleStatements:
12
# - Effect: "Allow"
13
# Action:
@@ -24,15 +26,12 @@ provider:
24
26
# - "Ref" : "setupname"
25
27
# - '/*'
28
-
29
30
functions:
31
api:
32
handler: wsgi_handler.handler
33
events:
34
- - http: ANY /
35
- - http: ANY /{proxy+}
+ - httpApi:
+ path: '*'
36
# handler:
37
# handler: handler.hello
38
# timeout: 300
0 commit comments