Routes not propagating to forest correctly

Feature(s) impacted

Routing in forest backend api

Observed behavior

This one succeeds

This one fails
image

Expected behavior

Both requests should succeed

Checking out the logs, the first request has the correct GET endpoint, the second one is getting rewritten to /

I am using API Gateway in AWS to route this into our cluster. The integration path is just ANY /forest/{proxy+}, which catches both requests.

I suspect (???) that something having to do with the express base path ‘forest’ is causing something on the forestadmin backend API side to turn a request to /forest/account into just /, which a request for /forest/account/count is correctly marshalled into /account/count. Any ideas?

Failure Logs

[32minfo:e[0m [200] GET /account/count - 0ms
[32minfo:e[0m [200] GET / - 0ms

Context

  • Project name: bluebot-customer-support-management
  • Team name: bluebot
  • Environment name: …
  • Agent (forest package) name & version: …
  • Database type: postgres
  • Recent changes made on your end if any: …

Hi @ZavenArra ,

Both screens are the same in your message.
Could you share the one failing ?

Best regards,

Shohan

Sorry, thanks. You can see the quest to account is failing, here’s the result.

The client thinks this is a ‘CORS Error’ but in fact the error is just that the request path responding is /, and thus does not send any response headers. presumably because the the agent gives no response at /

Hi @ZavenArra , sorry for the late answer.

It seems that the URL is containing ‘forest’ twice: dev-develop.bluebot.com/forest/forest/account

It might come from this wrong routing.

Best regards,

Shohan