-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathserverless.yml
More file actions
38 lines (33 loc) · 1006 Bytes
/
Copy pathserverless.yml
File metadata and controls
38 lines (33 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
service: static-file-handler-demo-offline
frameworkVersion: "3"
plugins:
- serverless-offline
- serverless-aws-static-file-handler/plugins/BinaryMediaTypes
custom:
apiGateway:
binaryMediaTypes:
# You can use the wildcard character (*) to cover multiple media types per https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html
# NOTE: Using */* has a side effect as noted at https://github.com/activescott/serverless-aws-static-file-handler
# IANA descrete type wildcards from: https://www.iana.org/assignments/media-types/media-types.xhtml
- application/*
- audio/*
- font/*
- image/*
- video/*
provider:
name: aws
runtime: nodejs20.x
lambdaHashingVersion: 20201221
functions:
html:
handler: handler.root
events:
- http:
path: /
method: get
binary:
handler: handler.binary
events:
- http:
path: /binary/{pathvar+}
method: get