Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_csrftoken missing from RenderArgs #17

Closed
carc1n0gen opened this issue Oct 31, 2015 · 0 comments
Closed

_csrftoken missing from RenderArgs #17

carc1n0gen opened this issue Oct 31, 2015 · 0 comments

Comments

@carc1n0gen
Copy link

When trying to put the csrf token in a form with {{ csrftoken . }} I get:

Template Execution Panic in App/Index.html:
REVEL CSRF: _csrftoken missing from RenderArgs.

Here is my list of filters:

revel.Filters = []revel.Filter{
        revel.PanicFilter,             // Recover from panics and display an error page instead.
        revel.RouterFilter,            // Use the routing table to select the right Action
        revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters.
        revel.ParamsFilter,            // Parse parameters into Controller.Params.
        revel.SessionFilter,           // Restore and write the session cookie.
        csrf.CsrfFilter,               //-- Cross site Forgery protection
        revel.FlashFilter,             // Restore and write the flash cookie.
        revel.ValidationFilter,        // Restore kept validation errors and save new ones from cookie.
        revel.I18nFilter,              // Resolve the requested language
        HeaderFilter,                  // Add some security based headers
        revel.InterceptorFilter,       // Run interceptors around the action.
        revel.CompressFilter,          // Compress the result.
        revel.ActionInvoker,           // Invoke the action.
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant