Re: using AWS cloudfront with Django - CSRF failures

2016-04-28 Thread João Figueiredo
Hi John, Even though I'm two years late, in case someone runs into this problem I managed to solve it by: Whitelisting the 'x-csrfmiddlewaretoken' header (i.e. gets properly forwarded to origin) in the distribution settings. Whitelisting the 'csrftoken' cookie in the distribution behaviour. B

using AWS cloudfront with Django - CSRF failures

2014-06-26 Thread John Briere
I'm sure there's simple solution for this but I haven't found it. AWS Cloudfront strips out the referer header: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#RequestCustomRemovedHeaders Django requires a referer to exist and to matc