Skip to content

Commit

Permalink
Add default 5xx response to yml file? I hate CORS!!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Oct 22, 2024
1 parent feb8041 commit a2bdc21
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ resources:
RestApiId:
Ref: 'ApiGatewayRestApi'

GatewayResponseDefault5XX:
Type: 'AWS::ApiGateway::GatewayResponse'
Properties:
ResponseParameters:
gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
ResponseType: DEFAULT_5XX
RestApiId:
Ref: 'ApiGatewayRestApi'

functions:
authQuery:
handler: api/abstractplay.authQuery
Expand Down

0 comments on commit a2bdc21

Please sign in to comment.