Skip to content

Use modern CSRF protection from stdlib #16747

@simondeziel

Description

@simondeziel

Please confirm

  • I have searched existing issues to check if an issue already exists for my feature request.

Is your feature request related to a problem? Please describe.

LXD is now using Go 1.25 which comes with native CSRF protection.

Based on this blog, I think we could drop some custom code and leverage the builtin protection instead.

Describe the solution you'd like

Remove custom code and replace it with code from net/http to reduce the maintenance burden.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions