Reputation: 791
I would like to restrict access to certain resources to either authenticated users or clients from trusted IP addresses. Is there an out of the box solution for this or do I need to create a custom Voter for this...?
Upvotes: 1
Views: 828
Reputation: 29912
Into your security.yml
file
security:
#...
access_control:
- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
You could also secure the entire application, by add some controls into app.php
file, but I suppose that this isn't what you need
Upvotes: 2