You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you interested that I add a new P.R. to support port in access_control?
Currently if we would like to use access_control to redirect at, for example, localhost:8080, it is not possible.
So for improve this possibility I suggest to add a new key named port.
if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) {
Or we could go even further by adding a new key named redirect_to and if all is respected, we could use the key redirect the user to the value of this key.
What do think of that?
The text was updated successfully, but these errors were encountered:
This PR was squashed before being merged into the 4.2-dev branch (closes#28061).
Discussion
----------
[Security] add port in access_control
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26071
| License | MIT
| Doc PR | symfony/symfony-docs#10359
Add port in access_control
__Please Squash this P.R.__
Commits
-------
6413dcb [Security] add port in access_control
Are you interested that I add a new P.R. to support port in
access_control
?Currently if we would like to use
access_control
to redirect at, for example,localhost:8080
, it is not possible.So for improve this possibility I suggest to add a new key named
port
.Because Request::getHost() only retrieve the host without port.
And this is what is used to compare at this place
symfony/src/Symfony/Component/HttpFoundation/RequestMatcher.php
Line 166 in aaf2265
Or we could go even further by adding a new key named
redirect_to
and if all is respected, we could use the key redirect the user to the value of this key.What do think of that?
The text was updated successfully, but these errors were encountered: