File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
components/http_foundation Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,8 @@ the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this contex
139
139
that any stored session that was saved more than ``gc_maxlifetime `` ago should be
140
140
deleted. This allows one to expire records based on idle time.
141
141
142
- However, some operating systems do their own session handling and set the
143
- ``session.gc_probability `` variable to ``0 `` to stop PHP doing garbage
142
+ However, some operating systems (e.g. Debian) do their own session handling and set
143
+ the ``session.gc_probability `` variable to ``0 `` to stop PHP doing garbage
144
144
collection. That's why Symfony now overwrites this value to ``1 ``.
145
145
146
146
If you wish to use the original value set in your ``php.ini ``, add the following
Original file line number Diff line number Diff line change @@ -947,15 +947,15 @@ You can also use expressions inside your templates:
947
947
.. code-block :: html+jinja
948
948
949
949
{% if is_granted(expression(
950
- '"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
950
+ '"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
951
951
)) %}
952
952
<a href="...">Delete</a>
953
953
{% endif %}
954
954
955
955
.. code-block :: html+php
956
956
957
957
<?php if ($view['security']->isGranted(new Expression(
958
- '"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
958
+ '"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
959
959
))): ?>
960
960
<a href="...">Delete</a>
961
961
<?php endif; ?>
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ accepts an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
18
18
public function indexAction()
19
19
{
20
20
$this->denyAccessUnlessGranted(new Expression(
21
- '"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
21
+ '"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
22
22
));
23
23
24
24
// ...
Original file line number Diff line number Diff line change @@ -105,3 +105,9 @@ role:
105
105
106
106
It is also possible to specify using HTTPS in the routing configuration,
107
107
see :doc: `/routing/scheme ` for more details.
108
+
109
+ .. note ::
110
+
111
+ Forcing HTTPS while using a reverse proxy or load balancer requires a proper
112
+ configuration to avoid infinite redirect loops; see :doc: `/deployment/proxies `
113
+ for more details.
You can’t perform that action at this time.
0 commit comments