ActionView::Helpers::CsrfHelper
csrf_meta_tags
API docs (Rails 8.1.4.1) ↗Alias: csrf_meta_tag
def csrf_meta_tags()
Description
Creates the <meta> tags for the CSRF token.
Creates these two
<meta> tags:csrf-param: itscontentis the name of the parameter that holds the token (authenticity_token).csrf-token: itscontentis the token for this session, which JavaScript reads to add to its request headers.
protect_against_forgery? is false), nothing is created.ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params