📜  cors 标头缺少 vue api 网关 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:34.137000             🧑  作者: Mango

代码示例3
1# serverless.yml
2
3...
4
5        resources:
6          Resources:
7            GatewayResponseDefault4XX:
8              Type: 'AWS::ApiGateway::GatewayResponse'
9              Properties:
10                ResponseParameters:
11           gatewayresponse.header.Access-Control-Allow-Origin: "'*'"
12           gatewayresponse.header.Access-Control-Allow-Headers: "'*'"
13                ResponseType: DEFAULT_4XX
14                RestApiId:
15                  Ref: 'ApiGatewayRestApi'
16        ```