如何在Amazon API Gateway的API endpoints URL中省略阶段名称 .
例如,而不是api.domain.com/stagename/resource/我想有api.domain.com/resource .
您无法从API URL更改阶段,这是API网关的实现,但您可以根据需要将自定义域提供给API URL .
如果您使用自定义域名,则stage是可选的 - http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-console
或使用CloudFormation模板 - http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html
1 回答
您无法从API URL更改阶段,这是API网关的实现,但您可以根据需要将自定义域提供给API URL .
如果您使用自定义域名,则stage是可选的 - http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-console
或使用CloudFormation模板 - http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html