Skip to content

Commit

Permalink
ADX-1021 edited return url
Browse files Browse the repository at this point in the history
  • Loading branch information
toavina committed Jul 20, 2023
1 parent 1af74e4 commit e4b7675
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ape/routes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from urllib.parse import quote_plus, urlencode
from urllib.parse import quote_plus, urlencode, urlparse

from authlib.integrations.flask_client import OAuth
from flask import redirect, render_template, session, url_for, \
Expand All @@ -20,7 +20,9 @@ def home():
return_url = request.args.get("return_url", None)
lang = request.args.get("lang", None)
if return_url:
session["return_url"] = return_url
parsed_url = urlparse(return_url)
session['return_url'] = parsed_url.scheme + "://" + \
parsed_url.netloc + "/ape_data_receiver"
if lang and lang in current_app.config['LANGUAGES']:
session["lang"] = lang
if session.get("user_id", ""):
Expand Down

0 comments on commit e4b7675

Please sign in to comment.