<div dir="ltr">Hi,<div><br></div><div>I guess you should check out how to implement HTTPS on the web server. </div><div>For example, Apache or Nginx. Of course the dev server in Flask also supports </div><div>SSL if you set it up correctly. I did a brief search and found this snippet which </div><div>might be helpful to you: <a href="http://flask.pocoo.org/snippets/111/">http://flask.pocoo.org/snippets/111/</a> . Let me know if you </div><div>have any question following this article.</div><div><br></div><div>Thanks.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Best regards,<div>Ares Ou</div><div><br></div><div><b>Software Engineer / Full-Stack Python Developer</b></div><div><b><br></b></div><div><span style="font-size:12.8px"><b>Blog:</b> </span><a href="http://aresou.net" style="font-size:12.8px" target="_blank">http://aresou.net</a>  |  <span style="font-size:12.8px"><b>Github:</b> </span><a href="https://github.com/aresowj" style="font-size:12.8px" target="_blank">https://github.com/aresowj</a></div><div><span style="font-size:12.8px"><b>Stack Overflow:</b> </span><a href="http://stackoverflow.com/users/5183727/ares-ou" style="font-size:12.8px" target="_blank">http://stackoverflow.com/users/5183727/ares-ou</a></div><div><br></div><div><font color="#ffffff">Ares Ou</font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Oct 19, 2016 at 9:35 AM, 陆 徐超 <span dir="ltr"><<a href="mailto:luseiee@outlook.com" target="_blank">luseiee@outlook.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_5442590436387585510divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello Everyone:</p>
<p><br>
</p>
<p>I'm a beginner to web development.</p>
<p><br>
</p>
<p>I followed Miguel Grinberg's book and develop the flasky blog system. <span style="font-size:12pt">I deployed it to Heroku.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Now I bought a new domain name and resoluted the domain to my Heroku domain. When using the new domain, I found that it can't pass the SSL certification when using https. (Of course, the original Heroku URL is https enabled.) There's
 always a red cross on the URL in my Chrome browser.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">I bought a free CA from <span>Symantec and got two files .key and .pem.. Can anybody tell me how to use these two files in my FLASK project and make the https function well?</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span>And one more question. When I run my project with http using my own domain name, the user login state can't last long. I frequently need to login again. When I run it in https in Heroku domain name, it works well. Is
 that because the browser refresh the cookies under unsafe http browsing?</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span>Before reading this book, I have barely no idea about web, HTTP, maybe the question is a little bit silly.</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span>I hope someone could help me.</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span>Thanks a lot!</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span>Lu</span></span></p>
<p><span style="font-size:12pt"><span>2016.10.19</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
<p><span style="font-size:12pt"><span><br>
</span></span></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/flask</a><br>
<br></blockquote></div><br></div>