Skip to content
Discussion options

You must be logged in to vote

The middleware of the custom server is global, so it's expected that you get /* when accessing c.req.routePath.

You should define the middleware for bff api to get the routePath you expect.

If you need to get the routePath of bff api in the custom server, you can use c.set('routePath', c.req.routePath) in the lambda function, and then get it through c.get('routePath') in the custom server (please note that this method only supports the production environment. Due to the need to support hot updates for bff in the development environment, the routePath in the lambda function is fixed as ${prefix}/*).

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Oripi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Oripi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants