When displaying the password link, show it as https, not http
This commit is contained in:
parent
b555472d0f
commit
812539fc06
2 changed files with 3 additions and 2 deletions
3
app.py
3
app.py
|
@ -56,7 +56,8 @@ def index():
|
||||||
def handle_password():
|
def handle_password():
|
||||||
ttl, password = clean_input()
|
ttl, password = clean_input()
|
||||||
key = set_password(password, ttl)
|
key = set_password(password, ttl)
|
||||||
return render_template('confirm.html', password_link=request.url_root+key)
|
link = request.url_root.replace("http://", "https://") + key
|
||||||
|
return render_template('confirm.html', password_link=link)
|
||||||
|
|
||||||
@application.route('/<password_key>', methods=['GET'])
|
@application.route('/<password_key>', methods=['GET'])
|
||||||
def show_password(password_key):
|
def show_password(password_key):
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
||||||
<script src="{{ config.STATIC_URL }}/bootstrap/js/bootstrap.min.js"></script>
|
<script src="{{ config.STATIC_URL }}/bootstrap/js/bootstrap.min.js"></script>
|
||||||
{% block js %}{% endblock %}
|
{% block js %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue