Skip to content

X-XSRF-TOKEN header automatic generation for trusted hosts #6035

Closed

Description

@valentin-panov

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

I always get frustrated when I need to create a interceptor to populate the X-XSRF-TOKEN header based on the value of the XSRF-TOKEN cookie, and then send the request to a trusted host.

Describe the solution you'd like

  1. I believe it's possible to introduce a parameter in the Axios default settings where we can store a list of trusted hosts.

  2. Moreover, may be we need to have an obvious switcher to have that automation or not. Some systems may experience difficulties when facing the unexpected header in the request.

Describe alternatives you've considered

No response

Additional context/Screenshots

No response

Activity

  1. added a commit that references this issue on Oct 28, 2023
  2. jasonsaayman commented on Aug 1, 2025

    @jasonsaayman
    Member

    Thanks for the issue, we are adding this as a potential feature to a mega-feature issue with many feature requests please see the motivation for doing this:

    #6983

    And the mega-feature issue here:

    #6984

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions