Skip to content

Add port in access_control? #26071

Closed
Closed
@roukmoute

Description

@roukmoute
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3

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

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions