Closed
Description
The RedirectsPanel
creates a new response, preserving only the cookies of the original response. Then any additional information in the original response is lost and cannot be made visible in the toolbar’s panels. In our case, each response has authorization information and I would like to be able to verify that this information is captured correctly also when the user is ultimately redirected. The fix looks quite straightforward, within the if
:
https://github.com/jazzband/django-debug-toolbar/blob/f1387801e84a343fbce5c7955423f87589790a26/debug_toolbar/panels/redirects.py#L20
modify the code creating the new response to
original_response = response
response = SimpleTemplateResponse( ... )
response.original_response = original_response
Everything else will be taken care of by custom code in the relevant panels...