Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将某些资源的访问权限限制为经过身份验证的用户或来自受信任 IP 地址的客户端。是否有一个开箱即用的解决方案,或者我需要为此创建一个自定义选民......?
进入你的security.yml档案
security.yml
security: #... access_control: - { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
您还可以通过在文件中添加一些控件来保护整个应用程序app.php,但我想这不是您需要的
app.php