Skip to content

Allow localhost redirect with dynamic ports#156

Merged
taylorotwell merged 5 commits into
laravel:mainfrom
dylanbr:dylanbr/allow-localhost-redirect-domains
Feb 18, 2026
Merged

Allow localhost redirect with dynamic ports#156
taylorotwell merged 5 commits into
laravel:mainfrom
dylanbr:dylanbr/allow-localhost-redirect-domains

Conversation

@dylanbr
Copy link
Copy Markdown
Contributor

@dylanbr dylanbr commented Feb 17, 2026

Following on from my last post in issue #137, I've prepared a PR to allow for localhost redirect URLs with dynamic ports.

A new configuration flag allow_localhost_dynamic_port has been added. When set to true, all variations of http (not https) localhost URLs will be allowed, regardless of the port.

The default has been set to true, which I feel compliments the default of * for the allowlist itself. Let me know if you think that this should default to false.

@pushpak1300
Copy link
Copy Markdown
Member

pushpak1300 commented Feb 18, 2026

I Removed allow_localhost_dynamic_port config, it will be now derived localhost permission implicitly from redirect_domains

so if you add http://localhost then only all the localhost port will work.

@taylorotwell taylorotwell merged commit d2fafc3 into laravel:main Feb 18, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants