Skip to content

Commit

Permalink
don't skip query params when creating og_url
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Oct 23, 2023
1 parent 6e3acfa commit 840d924
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions routers/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ def explore_page(request: Request, json_data: dict = Depends(request_json)):
lambda: page_wrapper(request=request, render_fn=explore.render),
**json_data,
)
canonical_url = str(furl(settings.APP_BASE_URL) / request.url.path)
ret |= {
"meta": raw_build_meta_tags(
url=canonical_url,
url=get_og_url_path(request),
title=explore.META_TITLE,
description=explore.META_DESCRIPTION,
),
Expand Down Expand Up @@ -265,7 +264,7 @@ def st_page(

ret |= {
"meta": build_meta_tags(
url=canonical_url,
url=get_og_url_path(request),
page=page,
state=state,
run_id=run_id,
Expand All @@ -281,6 +280,10 @@ def st_page(
return ret


def get_og_url_path(request) -> str:
return str(furl(settings.APP_BASE_URL) / request.url.full_path)


def get_run_user(request, uid) -> AppUser | None:
if not uid:
return
Expand Down

0 comments on commit 840d924

Please sign in to comment.