Skip to content

Commit d18f2d6

Browse files
base_url usage on landing page (#635)
* base_url usage * pre-commit formatting --------- Co-authored-by: Vincent Sarago <[email protected]>
1 parent 397de7e commit d18f2d6

File tree

1 file changed

+2
-6
lines changed
  • stac_fastapi/types/stac_fastapi/types

1 file changed

+2
-6
lines changed

stac_fastapi/types/stac_fastapi/types/core.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,7 @@ async def landing_page(self, **kwargs) -> stac_types.LandingPage:
581581
"rel": "service-desc",
582582
"type": "application/vnd.oai.openapi+json;version=3.0",
583583
"title": "OpenAPI service description",
584-
"href": urljoin(
585-
str(request.base_url), request.app.openapi_url.lstrip("/")
586-
),
584+
"href": urljoin(base_url, request.app.openapi_url.lstrip("/")),
587585
}
588586
)
589587

@@ -593,9 +591,7 @@ async def landing_page(self, **kwargs) -> stac_types.LandingPage:
593591
"rel": "service-doc",
594592
"type": "text/html",
595593
"title": "OpenAPI service documentation",
596-
"href": urljoin(
597-
str(request.base_url), request.app.docs_url.lstrip("/")
598-
),
594+
"href": urljoin(base_url, request.app.docs_url.lstrip("/")),
599595
}
600596
)
601597

0 commit comments

Comments
 (0)