Hello.

I've run into an issue in the checkout view, when I moved the shop to
SSL-enabled mode. The satchmo_contact_ajax_state view, which is used
to update the state/province field on the contact form doesn't work
when SSL is enabled

The thing is that since /checkout/ is SSL-protected, then /checkout/
is actually at https://example.com/checkout/ and since the AJAX
request is sent to "{% url satchmo_contact_ajax_state %}" in the
contact/_state_js.html template (which resolves to "/ajax_state/"), a
POST request gets gets sent to https://example.com/ajax_state/

Now since THAT view ISN'T SSL-protected, the middleware redirects it
to http://example.com/ajax_state/, but the POST request gets lost in
the middle.

I fixed this by appending a satchmo_contact_ajax_state_secure url with
{SSL: True} in it's default kwargs, and wrapping the ajax call in
_state_js.html in an {% if request.is_secure %} changing the url
accordingly.

I see that this was fixed in a newer version of satchmo, passing
{'SSL': ssl } to that url. I started writing this email before
checking that, sorry, but the thing is, since this is a
non-side-effects request, shouldn't this be non-SSL-protected, and
have it be a GET request instead?

-- 
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.

Reply via email to