DEV: Fix `BAD CSRF` errors for admin POST requests when on Ember CLI (#12908)

This commit is contained in:
Osama Sayegh 2021-04-30 13:26:48 +03:00 committed by GitHub
parent 3bcce65c8b
commit 19ee38b78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -22,12 +22,12 @@ function htmlTag(buffer, bootstrap) {
function head(buffer, bootstrap) {
if (bootstrap.csrf_token) {
buffer.push(`<meta name="csrf-param" buffer="authenticity_token">`);
buffer.push(`<meta name="csrf-token" buffer="${bootstrap.csrf_token}">`);
buffer.push(`<meta name="csrf-param" content="authenticity_token">`);
buffer.push(`<meta name="csrf-token" content="${bootstrap.csrf_token}">`);
}
if (bootstrap.theme_ids) {
buffer.push(
`<meta name="discourse_theme_ids" buffer="${bootstrap.theme_ids}">`
`<meta name="discourse_theme_ids" content="${bootstrap.theme_ids}">`
);
}