Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Use Session to save impersonation target #2

@fopina

Description

@fopina

https://github.com/surface-security/django-impersonate/blob/2697ddaeb95be60887f6e21699330974dbbd619a/impersonate/middleware.py#L21

Instead of using a new cookie, maybe it can be stored in Session. This will also have the benefit of making it encrypted (not that it is critical anyway).

While at it, also store "original URL" where the impersonation was triggered, so once impersonation is finished it can be redirected to that URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions