![](/img/trans.png)
[英]How to get the name of the stage in an AWS Lambda function linked to API Gateway
[英]How to omit stage name from url in AWS Api gateway?
如何在Amazon API Gateway的API端點URL中省略階段名稱。
例如,我想使用api.domain.com/resource/而不是api.domain.com/stagename/resource/。
您不能從API URL(這是API網關的實現)更改階段,但可以根據需要將自定義域賦予API URL。
如果您使用的是自定義域名,則階段是可選的-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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.