Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timgl committed Dec 17, 2023
1 parent 3e16dd4 commit 421ca2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def handler500(request):

@ensure_csrf_cookie
def home(request, *args, **kwargs):
if settings.REDIRECT_APP_TO_US and request.build_absolute_uri().startswith("https://app.posthog.com"):
if settings.REDIRECT_APP_TO_US and request.get_host().split(":")[0] == "app.posthog.com":
return HttpResponseRedirect("https://us.posthog.com{}".format(request.get_full_path()))
return render_template("index.html", request)

Expand Down

0 comments on commit 421ca2a

Please sign in to comment.