2👍
✅
Not sure if it’s the best option, but you can compare request.get_host() with response['Location']
(or response.url in django dev version).
Hope that helps.
Source:stackexchange.com