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
139139that any stored session that was saved more than ``gc_maxlifetime `` ago should be
140140deleted. This allows one to expire records based on idle time.
141141
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
144144collection. That's why Symfony now overwrites this value to ``1 ``.
145145
146146If 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:
947947 .. code-block :: html+jinja
948948
949949 {% 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())'
951951 )) %}
952952 <a href="...">Delete</a>
953953 {% endif %}
954954
955955 .. code-block :: html+php
956956
957957 <?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())'
959959 ))): ?>
960960 <a href="...">Delete</a>
961961 <?php endif; ?>
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ accepts an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
1818 public function indexAction()
1919 {
2020 $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())'
2222 ));
2323
2424 // ...
Original file line number Diff line number Diff line change @@ -105,3 +105,9 @@ role:
105105
106106 It is also possible to specify using HTTPS in the routing configuration,
107107see :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