请帮帮我。我做错了什么。我想通过api gataway访问ec2并编写了cloudformation模板
paths:
/{proxy+}:
x-amazon-apigateway-any-method:
headers:
Access-Control-Allow-Headers:
type: "string"
Access-Control-Allow-Methods:
type: "string"
Access-Control-Allow-Origin:
type: "string"
Content-Type:
type: "string"
authority:
type: "string"
produces:
- "application/json"
parameters:
- name: "proxy"
in: "path"
required: false
type: "string"
responses: {}
x-amazon-apigateway-integration:
responses:
default:
statusCode: "200"
uri: "http://ec2-1111111111.eu-west-1.compute.amazonaws.com/{proxy}"
requestParameters:
integration.request.header.Content-Type: "'text/html'"
"integration.request.path.proxy": "method.request.path.proxy"
passthroughBehavior: "when_no_match"
httpMethod: ANY
type: "http_proxy
为此,我定义了1个端点http_proxy。当我测试此端点时,一切正常,但是一旦部署api并尝试通过浏览器进行访问,错误404就会崩溃