A method for getting the base url
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
For some usecases, it would be great to be able to find the base URL for the chalice deployment itself. E.g. if returning documents that links to different url's for more information on objects.
This is especially helpful when dealing using chalice to serve HTML back. Something like _app.get_base_url()._
E.g. if i request https://lambda.mydomain.tld/v1/prod/overview and this is served by:
```
@app.route('/overview')
def overview():
```
I can then in the **overview** function use _app.get_base_url()_ to get **https://lambda.mydomain.tld/v1/prod/**
Alternatively, if that is too difficult, i would be fine if i could at least get **/v1/prod** returned.
I couldn't find any such function in the documentation.
Contributor guide
Assessment
This issue has not been assessed yet.