Replies: 1 comment
-
I found the original discussion about why this works this way: Adam writes:
I'm sadly not sure how to modify this code to solve for your concern (Laravel correctly knowing the local site you're trying to represent) and theirs (Laravel correctly generating links to the ngrok version of URLs, not the local version). |
Beta Was this translation helpful? Give feedback.
-
Hi,
Valet share recently started failing for me when using Stripe webhooks. I'm running this command:
I found that in
server.php
that the value forHTTP_X_FORWARDED_HOST
is being set toHTTP_X_ORIGINAL_HOST
from ngrok:In my use-case, this appears to be the opposite of what is desired.
Requests through ngrok set the
X-Original-Host
header to the ngrok url, and theHost
header is set to my local valet domain.The
frontControllerPath
method inLaravelValetDriver
then sets theHTTP_HOST
from thisHTTP_X_FORWARDED_HOST
value:This means that
HTTP_X_FORWARDED_HOST
,HTTP_X_ORIGINAL_HOST
, andHTTP_HOST
all get set to the ngrok url, and my routes with domain restriction fail with 404's.If I comment out the lines in
server.php
, everything works as expected. Am I missing something here?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions