I'm setting up FOSRestBundle and have some doubts, don't know if related to Symfony2 Routing component or can be done in any other way. Here,
1) How do I check if X-PDONE-SESSION-ID
is set on request headers before execute the method? Can this be done using annotations on routing? Any ideas on how to check that?
2) I need to use this RegEx \b(?:(?:https?):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]
as requirements
in the route @QueryParam(name="token", requirements="")
for check valid URLs, how?