Browse Source

request.build_absolute_uri() behind a reverse proxy doesn't build https links. Construct URLs using settings.SITE_ROOT instead.

pull/15/head
Pēteris Caune 9 years ago
parent
commit
d68b9510bb
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      hc/front/views.py

+ 2
- 2
hc/front/views.py View File

@ -337,8 +337,8 @@ def add_pushover(request):
nonce = get_random_string() nonce = get_random_string()
request.session["po_nonce"] = nonce request.session["po_nonce"] = nonce
failure_url = request.build_absolute_uri(reverse("hc-channels"))
success_url = request.build_absolute_uri(reverse("hc-add-pushover")) + "?" + urlencode({
failure_url = settings.SITE_ROOT + reverse("hc-channels")
success_url = settings.SITE_ROOT + reverse("hc-add-pushover") + "?" + urlencode({
"nonce": nonce, "nonce": nonce,
"prio": request.POST.get("po_priority", "0"), "prio": request.POST.get("po_priority", "0"),
}) })


Loading…
Cancel
Save