jordaneremieff / mangum

AWS Lambda support for ASGI applications
https://mangum.io/
MIT License
1.67k stars 119 forks source link

Wrong domain when using AWS Lambda FunctionUrls and CloudFront with FastAPI #302

Open fabge opened 1 year ago

fabge commented 1 year ago

I am trying to deploy a site using AWS CloudFront with an AWS Lambda FunctionUrl as Custom Origin.

The deployment works fine, with one big problem:

When I visit the CloudFront domain, every link on the site which is generated with FastAPIs url_for as the FunctionUrl domain instead of the CloudFront Domain.

Can I somehow set the base_url?