37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
Api{{ nameFirst }}:
|
|
handler: src/baseblocks/{{ nameKebab }}/{{ nameKebab }}-api.handler
|
|
events:
|
|
- http:
|
|
path: /{{ nameKebab }}/{any+}
|
|
method: ANY
|
|
authorizer: # https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers
|
|
type: COGNITO_USER_POOLS
|
|
authorizerId:
|
|
Ref: ApiGatewayAuthorizer
|
|
cors:
|
|
origin: ${self:custom.apiCorsOrigin}
|
|
headers:
|
|
- Content-Type
|
|
- X-Amz-Date
|
|
- Authorization
|
|
- X-Api-Key
|
|
- X-Amz-Security-Token
|
|
- X-Amz-User-Agent
|
|
allowCredentials: false
|
|
- http:
|
|
path: /{{ nameKebab }}
|
|
method: ANY
|
|
authorizer: # https://www.serverless.com/framework/docs/providers/aws/events/apigateway#http-endpoints-with-aws_iam-authorizers
|
|
type: COGNITO_USER_POOLS
|
|
authorizerId:
|
|
Ref: ApiGatewayAuthorizer
|
|
cors:
|
|
origin: ${self:custom.apiCorsOrigin}
|
|
headers:
|
|
- Content-Type
|
|
- X-Amz-Date
|
|
- Authorization
|
|
- X-Api-Key
|
|
- X-Amz-Security-Token
|
|
- X-Amz-User-Agent
|
|
allowCredentials: false |