When displaying the password link, show it as https, not http

This commit is contained in:
Ryan Park 2012-10-10 16:09:45 -07:00 committed by Dave Dash
parent b555472d0f
commit 812539fc06
2 changed files with 3 additions and 2 deletions

3
app.py
View file

@ -56,7 +56,8 @@ def index():
def handle_password():
ttl, password = clean_input()
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'])
def show_password(password_key):

View file

@ -19,7 +19,7 @@
</div>
</div>
{% 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>
{% block js %}{% endblock %}
</body>