Tuesday, May 31, 2016

setting custom header before redirect

I need to set a custom header before I do a redirect. My code does this:

resp = redirect(uri)
resp['X-Capdata-Auth'] = 'authorized'
return resp

But when I look at the traffic with tcpdump, I do not see that header
value. What am I doing wrong here?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY4N3h0sWY49nUGEhFrtWug4Z3-qJ6eoRkfaK3dvhvxEEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment