Skip to content

Commit

Permalink
base_url usage on landing page (#635)
Browse files Browse the repository at this point in the history
* base_url usage

* pre-commit formatting

---------

Co-authored-by: Vincent Sarago <[email protected]>
  • Loading branch information
zachcoleman and vincentsarago authored Apr 9, 2024
1 parent 397de7e commit d18f2d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions stac_fastapi/types/stac_fastapi/types/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,7 @@ async def landing_page(self, **kwargs) -> stac_types.LandingPage:
"rel": "service-desc",
"type": "application/vnd.oai.openapi+json;version=3.0",
"title": "OpenAPI service description",
"href": urljoin(
str(request.base_url), request.app.openapi_url.lstrip("/")
),
"href": urljoin(base_url, request.app.openapi_url.lstrip("/")),
}
)

Expand All @@ -593,9 +591,7 @@ async def landing_page(self, **kwargs) -> stac_types.LandingPage:
"rel": "service-doc",
"type": "text/html",
"title": "OpenAPI service documentation",
"href": urljoin(
str(request.base_url), request.app.docs_url.lstrip("/")
),
"href": urljoin(base_url, request.app.docs_url.lstrip("/")),
}
)

Expand Down

0 comments on commit d18f2d6

Please sign in to comment.