在 参数.yml 文件中有一个名为 的参数 secret 默认为 ThisTokenIsNotSoSecretChangeIt
但它应该改为别的东西。
如果在生产中更改此参数的值会发生什么情况?它可以打破任何东西吗?
最佳答案
它不会破坏任何东西。更改值 secret 不时的参数甚至被认为是一种很好的做法,官方文档建议:
http://symfony.com/doc/current/reference/configuration/framework.html#secret
唯一需要注意的是:
However, keep in mind that changing this value will invalidate all signed URIs and Remember Me cookies. That's why, after changing this value, you should regenerate the application cache and log out all the application users.
关于php - Symfony 可以改变 'secret' 参数破坏什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51947898/