Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpClientXsrfModule

An NgModule that adds XSRF protection support to outgoing requests.

For a server that supports a cookie-based XSRF protection system, use directly to configure XSRF protection with the correct cookie and header names.

If no names are supplied, the default cookie name is XSRF-TOKEN and the default header name is X-XSRF-TOKEN.

Hierarchy

  • HttpClientXsrfModule

Index

Methods

Static disable

  • disable(): ConfiguredModule
  • Disable the default XSRF protection.

    Returns ConfiguredModule

Static withOptions

  • withOptions(options?: { cookieName?: string; headerName?: string }): ConfiguredModule
  • Configure XSRF protection.

    Parameters

    • Default value options: { cookieName?: string; headerName?: string } = {}

      An object that can specify either or both cookie name or header name.

      • Cookie name default is XSRF-TOKEN.
      • Header name default is X-XSRF-TOKEN.
      • Optional cookieName?: string
      • Optional headerName?: string

    Returns ConfiguredModule

Generated using TypeDoc