diff --git a/website/routes.py b/website/routes.py index a15ee6a..f145750 100644 --- a/website/routes.py +++ b/website/routes.py @@ -124,6 +124,12 @@ def hnsid_domain(domain): db.session.commit() session["id"] = user.id session.permanent = True + + # Check if next page is specified + next_page = request.args.get("next") + if next_page: + return redirect(next_page) + return redirect("/") return jsonify({"success": False, "error": "Domain not found"}) diff --git a/website/templates/home.html b/website/templates/home.html index 59a0c1f..ce29af1 100644 --- a/website/templates/home.html +++ b/website/templates/home.html @@ -213,7 +213,7 @@