-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api)!: use root path for prefixing #241
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anayeaye
changed the title
WIP fix(apis)! use root path for prefixing
fix(apis)! use root path for prefixing
Oct 24, 2023
anayeaye
changed the title
fix(apis)! use root path for prefixing
fix! use root path for prefixing
Oct 24, 2023
anayeaye
changed the title
fix! use root path for prefixing
fix(api)!: use root path for prefixing
Oct 24, 2023
1 task
smohiudd
approved these changes
Oct 31, 2023
stac_api/runtime/handler.py
Outdated
logging.getLogger("mangum.lifespan").setLevel(logging.ERROR) | ||
logging.getLogger("mangum.http").setLevel(logging.ERROR) | ||
|
||
handler = Mangum(app, lifespan="auto") | ||
handler = Mangum(app, lifespan="auto", api_gateway_base_path=settings.root_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using settings
I think you can use app.root_path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ividito
approved these changes
Nov 1, 2023
anayeaye
added a commit
that referenced
this pull request
Nov 13, 2023
…cloudfront (#244) # What - adds optional configuration to deploy all endpoints with a custom root path (i.e. `/api/stac` and `/api/raster`) #229, #241 - adds support for using a cloudfront as a reverse proxy #229, #241, #245 - titiler-pgstac upgraded from 0.2.3 to 0.8.0 #239 - titiler upgrade for custom colormap configuration #243 # How tested A temporary test stack was deployed to confirm that raster-api works as expected and that the two-subdomain staging-stac and staging-raster pattern is still supported. The [pre-deploy diff action for this pr](https://github.com/NASA-IMPACT/veda-backend/actions/runs/6791564314/job/18463354484#step:11:919) confirms that the raster API lambda will be upgraded and no domain name changes will be caused.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Use fast-api root path configuration and mangum api_base_path instead of overwriting the api host in the http lambda integration
root_path
for optional base path configurationand, if provided, also set proxy url in additional servers propertySimplify custom domain management
How tested
Temporary stacks are running to test the two supported path configurations:
test-raster
) for the raster API: https://test-raster.delta-backend.com/docs/api/raster
) for the raster API: https://alex.delta-backend.xyz/api/raster/docs