class Ktistec::CSRF

Overview

CSRF preventing middleware.

Defined in:

framework/csrf.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(header : String = "X-CSRF-Token", allowed_routes : Array(String) = [] of String, allowed_methods : Array(String) = ["GET", "HEAD", "OPTIONS", "TRACE"] of ::String, parameter_name : String = "authenticity_token", error : String | HTTP::Server::Context -> String = "Forbidden (CSRF)") #

[View source]

Instance Method Detail

def call(context) #

[View source]
def setup #

[View source]