Hi all, I'm trying to configure pylons to make a https connection.
I read the pylons documentation about that, but I don't success to redirect users to a secure connection. My apache configuration works well, with https or not. A large part of my web site don't require https but I need it to secure users purchases. How can I do to redirect "http://127.0.0.1:5000/myBasket" to "https:// 127.0.0.1:5000/myBasket" ? I have trying that in my routing.py : ########################## def to_https(match_dict): # specify that the protocol needs to be https, if it is not already if request.scheme == 'http': print "https" match_dict['_protocol'] = 'https' return match_dict map.connect("", "/myBasket/*url", controller="controlleur", action="getBasket",_filter=to_https) ########################## But it don't print anything, and the link work but with no https. I also try to add "ssl_pem = server.pem" in my development.ini as I read in docs. I also have an error when launching pylons : ########################### ... ssl_context.use_privatekey_file(ssl_pem) OpenSSL.SSL.Error: [('PEM routines', 'PEM_read_bio', 'no start line'), ('SSL routines', 'SSL_CTX_use_PrivateKey_file', 'PEM lib')] ########################### When I try to show "https://127.0.0.1:5000", it make an error Is there a way to do that simply or do I need to make a new site and redirect the link "myBasket" to this new site ? Thank you very much ! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
