func CSRF() macross.Handler {
	c := DefaultCSRFConfig
	return CSRFWithConfig(c)
}
CSRF returns a Cross-Site Request Forgery (CSRF) middleware.
See: https://en.wikipedia.org/wiki/Cross-site_request_forgery
package csrf
import (
	"crypto/subtle"
	"errors"
	"strings"
	"time"
	"github.com/insionng/macross"
	"github.com/insionng/macross/libraries/gommon/random"
	"github.com/insionng/macross/skipper"
)
type (
	CSRFConfig struct {
		Skipper skipper.Skipper
		TokenLength uint8 `json:"token_length"`
		TokenLookup string `json:"token_lookup"`
		ContextKey string `json:"context_key"`
		CookieName string `json:"cookie_name"`
		CookieDomain string `json:"cookie_domain"`
		CookiePath string `json:"cookie_path"`
		CookieMaxAge int `json:"cookie_max_age"`
		CookieSecure bool `json:"cookie_secure"`
		CookieHTTPOnly bool `json:"cookie_http_only"`
	}
	csrfTokenExtractor func(*macross.Context) (string, error)
)
var (
	DefaultCSRFConfig = CSRFConfig{
		Skipper:      skipper.DefaultSkipper,
		TokenLength:  32,
		TokenLookup:  "header:" + macross.HeaderXCSRFToken,
		ContextKey:   "csrf",
		CookieName:   "_csrf",
		CookieMaxAge: 86400,
	}
)