set a valid value for the redirect to the front end, allow this to be overriden in production to any value.

This commit is contained in:
Dan 2021-02-15 16:05:58 -05:00
parent d7fa1a6d67
commit 2ed94788be
2 changed files with 4 additions and 2 deletions

View File

@ -117,10 +117,10 @@ def superuser(f):
return f(*args, **kwargs)
return decorated_function
@app.route('/')
def new_site():
return redirect(request.host_url[:-5] + "4200/dashboard") #TODO Put in the actual prod dashboard url
return redirect(app.config.get('FRONT_END_URL') + "/dashboard")
def __make_csv(sample_query):
csvfile = io.StringIO()

View File

@ -25,6 +25,8 @@ APPLICATION_ROOT = re.sub(r'//', '/', '/%s/' % environ.get('APPLICATION_ROOT', d
# have access to that in scheduled tasks run outside a request, this should include and match the APPLICATION_ROOT
# with no trailing backslask
URL_ROOT = environ.get('URL_ROOT', default="http://localhost:5000")
FRONT_END_URL = environ.get('FRONT_END_URL', default="http://localhost:4200")
DB_HOST = environ.get('DB_HOST', default="localhost")
DB_PORT = environ.get('DB_PORT', default="5433")