基础路径映射

0

【以下的问题经过翻译处理】 我正在努力使域映射正常工作。

我正在尝试创建:

https://api.dev.mycompany.com/estimates/

https://api.dev.mycompany.com/quotes/

因此,将两个(以后可能更多)API映射到我的域名上。

我已经在API GateWay上创建了域名api.dev.mycompany.com。如果我创建一个基本路径映射,空路径和目标指向Estimate:Stage,则对我的API的请求运行良好(在这个阶段未配置quotes)。

如果我将路径设置为“estimates”(或其他任何东西),并且将目标再次指向myapi:Stage,那么请求会导致430“缺少身份验证令牌”的错误。

这非常令人沮丧,因为在API GateWay CloudWatch日志中没有任何打印信息,因此我很难找到问题的根源。

有什么想法吗?

profile picture
EXPERTO
preguntada hace 5 meses62 visualizaciones
1 Respuesta
0

【以下的回答经过翻译处理】 你需要将API定义向上移一级。所以"/estimates"变为"/",在你的API定义中"/estimates/foo"变为"/foo"等等。同时,将Lambda的基本路径也设置为"/estimates"而不是"/estimates/estimates"。

profile picture
EXPERTO
respondido hace 5 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas