File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ define arbitrary matching logic, use the ``conditions`` routing option:
17
17
path : /contact
18
18
controller : ' App\Controller\DefaultController::contact'
19
19
condition : " context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'"
20
+ # expressions can also include config parameters
21
+ # condition: "request.headers.get('User-Agent') matches '%app.allowed_browsers%'"
20
22
21
23
.. code-block :: xml
22
24
@@ -30,6 +32,8 @@ define arbitrary matching logic, use the ``conditions`` routing option:
30
32
<route id =" contact" path =" /contact" >
31
33
<default key =" _controller" >App\Controller\DefaultController::contact</default >
32
34
<condition >context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i'</condition >
35
+ <!-- expressions can also include config parameters -->
36
+ <!-- <condition>request.headers.get('User-Agent') matches '%app.allowed_browsers%'</condition> -->
33
37
</route >
34
38
</routes >
35
39
@@ -50,6 +54,8 @@ define arbitrary matching logic, use the ``conditions`` routing option:
50
54
array(),
51
55
array(),
52
56
'context.getMethod() in ["GET", "HEAD"] and request.headers.get("User-Agent") matches "/firefox/i"'
57
+ // expressions can also include config parameters
58
+ // 'request.headers.get("User-Agent") matches "%app.allowed_browsers%"'
53
59
));
54
60
55
61
return $collection;
You can’t perform that action at this time.
0 commit comments