Skip to content

Request path includes API gateway stage twice #668

Closed
@dcchut

Description

@dcchut

Background

I have an API gateway hooked up to a lambda - I don't have any parameter mappings & I'm not using a custom domain. The lambda uses lambda_http together with axum. The API gateway has a stage called Prod, the invoke URL is along the lines of:

https://blablabla.execute-api.ap-southeast-2.amazonaws.com/Prod

Current outcome

When performing a request such as POST https://blablabla.execute-api.ap-southeast-2.amazonaws.com/Prod/auth/login,
lambda_http rewrites the request path to /Prod/Prod/auth/login.

Expected outcome

I would expect the request path to be /Prod/auth/login.

Other information

While there is a workaround (rewrite the path in middleware), the underlying behavior of including the stage twice is very surprising to me - is is possible I've misconfigured something?

Related discussion in #107 and #450.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions