Skip to content

[v4] Fix ngrok.io proxy/forwarding detection#1404

Merged
mattstauffer merged 1 commit intolaravel:masterfrom
drbyte:ngrok3-fix-for-valet4
Apr 26, 2023
Merged

[v4] Fix ngrok.io proxy/forwarding detection#1404
mattstauffer merged 1 commit intolaravel:masterfrom
drbyte:ngrok3-fix-for-valet4

Conversation

@drbyte
Copy link
Copy Markdown
Contributor

@drbyte drbyte commented Apr 25, 2023

Fixes #1384

Since Valet 4 uses Ngrok v3, this change is needed to accommodate the change ngrok made:

In ngrok v3 the X-Original-Host header was replaced with the more standard X-Forwarded-Host to better align with web standards.
More Info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host

Credit to @streamingsystems for doing the legwork.

Fixes laravel#1384

Since Valet 4 uses Ngrok v3, this change is needed to accommodate the change ngrok made:
> In ngrok v3 the `X-Original-Host` header was replaced with the more standard `X-Forwarded-Host` to better align with web standards.
> More Info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host

Credit to @streamingsystems for doing the legwork.

Co-authored-by: streamingsystems <streamingsystems@users.noreply.github.com>
@driesvints driesvints requested a review from mattstauffer April 25, 2023 07:35
@mattstauffer mattstauffer merged commit b5e4228 into laravel:master Apr 26, 2023
@mattstauffer
Copy link
Copy Markdown
Collaborator

Fantastic, thank you @streamingsystems and @drbyte!

@drbyte drbyte deleted the ngrok3-fix-for-valet4 branch April 26, 2023 15:56
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.

ngrok hostname when upgrading to v4

2 participants