Skip to content

Original response is lost when redirection is intercepted #1679

@interDist

Description

@interDist

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy