luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

Disable autoRegisterCsrf #2068

Closed nadar closed 3 years ago

nadar commented 3 years ago

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 commented 3 years ago

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

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