user2802154
user2802154

Reputation: 76

Symfony 3 - Firewall exlude one host

On one of my firewalls I would like to exlude one specific host. I tried many regex without success.

Bellow my example:

api:
        host: ^(?!.*(app\.domain\.com))
        pattern: .*

Thank you in advance.

Upvotes: 0

Views: 72

Answers (1)

Pratik
Pratik

Reputation: 1081

Use access control on security.yml like below:

    access_control:
    - { path: ^/$, roles:IS_AUTHENTICATED_ANONYMOUSLY}
    - { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }

Upvotes: 1

Related Questions