Work to flask derrière Nginx

This commit is contained in:
kitoy
2022-08-06 23:49:16 +02:00
parent 083a7147ff
commit b34695a41b
13 changed files with 88 additions and 40 deletions

View File

@@ -18,6 +18,8 @@ DATABASE = app.config['DATABASE']
MAIL_SERVER = app.config['MAIL_SERVER']
XMMP_SERVER = app.config['XMPP_SERVER']
SETUID = app.config['SETUID']
BASE_URL = app.config['BASE_URL']
#################################################################################################
@@ -103,17 +105,18 @@ def signin(token) :
conn.commit()
flash(u'Inscription réalisée avec succés !', 'succes')
resp = redirect(url_for('loginlogout.login', _external=True))
resp = redirect(url_for('loginlogout.login'))
else:
flash(u'Les mots de passe ne sont pas identiques !', 'error')
resp = render_template('inscription.html',
signin_enable=app.config['SIGNIN_ENABLE'],
hostname=hostname)
else :
url_inscription = BASE_URL+'invitation/'+token
resp = render_template('inscription.html',
signin_enable=app.config['SIGNIN_ENABLE'],
token=token, hostname=hostname, base_url=request.base_url)
token=token, hostname=hostname, url_inscription=url_inscription)
else:
resp = redirect(url_for('index', _external=True), code=401)
resp = redirect(BASE_URL, code=401)
return resp