CSRFConfig
Functions
Link copied to clipboard
All incoming requests must have an "Origin" header matching one of the hosts defined using this method.
Link copied to clipboard
Checks if the given header is present on each call to the server, and if its value conforms to the optional predicate. If conditions already exist for the header, they must all be satisfied.
Link copied to clipboard
Handle CSRF error conditions. By default, a 400 response is returned with a string response containing the error. As with any security-related error, it is advised to log the problem and return some generic response.
Link copied to clipboard
Checks if the "Origin" header has the same host as submitted in the "Host" header. This avoids needing to configure the expected host name where your application is deployed but will not work when it is deployed behind a proxy.