I'm working on WSSE Authentication for a REST API (in symfony2)
In the security.yml i have to put a regular expression in the pattern parameter for restricting url access.
pattern: ^/api/.*[^(connect|docs/.*)]
This regex is not working, and i have tried a lot of other combinaisons..
I would to restrict access for all API calls like :
/api/anything **BUT EXCEPT** for /api/connect **OR** /api/docs/ **OR** /api/docs/anything
You can use negative lookahead:
^/api/(?!(connect|docs/)).*$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With