Thanks Chris, I did as you suggested and it seems to work i.e., can complete a secure checkout, but out of curiosity can't I just delete the call to the redirect function as the first conditional deletes the SSL keyword already: del view_kwargs[SSL]? Is it even necessary to do anything besides deleting the call to the redirect as nginx is handling that? Sorry for the noob questions, I'm just curious.
On Oct 30, 4:33 pm, Chris Moffitt <[email protected]> wrote: > The issue you are having is that Satchmo's SSL middleware is trying to > redirect and your nginx config is trying to redirect. The error you are > seeing about the unexpected keyword is that the SSL parameter in your urls > is not getting stripped out correctly. If you are planning to use NGINX > redirection to secure your site, then I would suggest adding a custom > MIDDLEWARE that replaces 'satchmo_store.shop.SSLMiddleware.SSLRedirect' with > a custom one that removes the SSL keyword. > > If you review the very short code in SSLRedirect it should be clear how to > remove the SSL parameter. > > Does that make sense? > > -Chris > > On Fri, Oct 30, 2009 at 6:24 PM, neridaj <[email protected]> wrote: > > > I had a problem with this a little while ago and thought it was fixed > > but it appears not. I'm using nginx in front of apache2/wsgi and I'm > > having problems with infinite loops when trying to redirect insecure > > pages. I found a post with someone else having the same problem, which > > was was supposedly fixed by adding this to the nginx site on port 80: > > > location ~ ^/shop/checkout { > > rewrite ^/(.*)https://mydomain.com/$1permanent; > > } > > > This works when I get to the first /shop/checkout/ url but when I > > proceed to /shop/checkout/dummy/ it starts the endless loop. I don't > > see why I would need to add an if statement to this as it should only > > be evaluated if the url is insecure i.e., HTTP, but I did anyway, > > which still doesn't work: > > > location ~ ^/shop/checkout/ { > > if ($scheme = HTTP) { > > rewrite ^/(.*)https://dzopastudio.com/$1permanent; > > } > > } > > > I thought maybe that the satchmo ssl redirect middleware is causing > > problems when used with this nginx redirect but when I take it out I > > get the following error: > > > Exception Type: TypeError at /shop/checkout/dummy/ > > Exception Value: pay_ship_info() got an unexpected keyword argument > > 'SSL' > > > Thanks for any help, > > > Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo users" 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/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
