developmentseed / titiler

Build your own Raster dynamic map tile services
https://developmentseed.org/titiler/
MIT License
765 stars 157 forks source link

Support non-root paths in AWS API Gateway Lambda handler #716

Closed DanSchoppe closed 11 months ago

DanSchoppe commented 11 months ago

What I am changing

This PR introduces the ability to host TiTiler on a non-root (non-/) AWS API Gateway route. It's the second attempt after closing developmentseed/titiler#515.

How I did it

As suggested by Vincent, I passed the TITILER_API_ROOT_PATH environment variable to Mangum's api_gateway_base_path argument.

How you can test it

Deploy TiTiler as a proxy Lambda to a non-root AWS API Gateway route. Query the various endpoints to confirm they resolve correctly.

FWIW, I tested this change on AWS.

Related Issues

Closes #513

vincentsarago commented 11 months ago

thanks @DanSchoppe 🙏