Init
This commit is contained in:
commit
0029086b3f
148 changed files with 19047 additions and 0 deletions
37
commands/add-object/template/api/blank-functions.yml
Normal file
37
commands/add-object/template/api/blank-functions.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue