[Flask] 答复: Question about SSL certificate on custom domain

陆 徐超 luseiee at outlook.com
Wed Oct 19 13:22:03 EDT 2016


Dear Corey Boyle:

Thanks a lot!!

I will follow the instruction of Heroku. I hope this problem can be solved.


Lu


________________________________
发件人: Corey Boyle <coreybrett at gmail.com>
发送时间: 2016年10月20日 1:12:48
收件人: Ares Ou
抄送: 陆 徐超; flask at python.org
主题: Re: [Flask] Question about SSL certificate on custom domain

@luseiee - When using Heroku, your application will be behind their
proxy service. Therefore, you need to install the certs within their
system. https://devcenter.heroku.com/articles/ssl

On Wed, Oct 19, 2016 at 12:39 PM, Ares Ou <aresowj at gmail.com> wrote:
> Hi,
>
> I guess you should check out how to implement HTTPS on the web server.
> For example, Apache or Nginx. Of course the dev server in Flask also
> supports
> SSL if you set it up correctly. I did a brief search and found this snippet
> which
> might be helpful to you: http://flask.pocoo.org/snippets/111/ . Let me know
> if you
> have any question following this article.
>
> Thanks.
>
>
>
> Best regards,
> Ares Ou
>
> Software Engineer / Full-Stack Python Developer
>
> Blog: http://aresou.net  |  Github: https://github.com/aresowj
> Stack Overflow: http://stackoverflow.com/users/5183727/ares-ou
>
> Ares Ou
>
> On Wed, Oct 19, 2016 at 9:35 AM, 陆 徐超 <luseiee at outlook.com> wrote:
>>
>> Hello Everyone:
>>
>>
>> I'm a beginner to web development.
>>
>>
>> I followed Miguel Grinberg's book and develop the flasky blog system. I
>> deployed it to Heroku.
>>
>>
>> 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.
>>
>>
>> I bought a free CA from 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?
>>
>>
>> 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?
>>
>>
>> Before reading this book, I have barely no idea about web, HTTP, maybe the
>> question is a little bit silly.
>>
>>
>> I hope someone could help me.
>>
>>
>> Thanks a lot!
>>
>>
>> Lu
>>
>> 2016.10.19
>>
>>
>>
>>
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
>>
>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20161019/9b579729/attachment.html>


More information about the Flask mailing list