【发布时间】:2020-08-27 03:42:50
【问题描述】:
有没有办法在 Cloudformation 中为 API 网关设置 GatewayResponse,响应主体为空(最好没有响应 Content-Type)
我尝试过这样的事情:
InvalidApiKeyResponse:
Type: AWS::ApiGateway::GatewayResponse
Properties:
ResponseType: INVALID_API_KEY
RestApiId: !Ref RestApi
StatusCode: 403
但它仍然返回默认的应用程序/json 响应。
在 AWS 控制面板中,当我尝试设置空响应时,出现以下错误:Invalid null or empty value in responseTemplates
【问题讨论】:
标签: amazon-web-services aws-api-gateway