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

Disable autoRegisterCsrf #2068

Closed
nadar opened this issue Nov 13, 2020 · 1 comment · Fixed by #2075
Closed

Disable autoRegisterCsrf #2068

nadar opened this issue Nov 13, 2020 · 1 comment · Fixed by #2075
Assignees
Milestone

Comments

@nadar
Copy link
Member

nadar commented Nov 13, 2020

Since ActiveForm is widely used in Yii Framework context, the property autoRegisterCsrf should be disabled by default instead of enabled.

This means that forms which do not use ActiveForm needs to run luya\helpers\Html::csrfMetaTags().

@nadar nadar added this to the 2.0 milestone Nov 13, 2020
@nadar nadar self-assigned this Nov 13, 2020
@nadar
Copy link
Member Author

nadar commented Feb 11, 2021

In order to restore the previous behavior, use in your config:

$config->webComponent('view', [
    'autoRegisterCsrf' => true,
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant