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
Had an issue a few days ago where I migrated an old project onto Nginx. The configuration for the project is a wildcard vhost. Had it running in apache fine for a few years and replicated the configuration in nginx.
The nginx conf file for the vhost looks something like this server *.domain.com {...
In my F3/PHP code, I parse out the subdomain from $f3->get('HOST') and take a specific action. After the change this stopped working. Seems that I was getting *.domain.com as the return value for $f3->get('HOST') instead of sub.domain.com
Ended up changing my code to parse from $_SERVER['HTTP_HOST'] instead of $f3->get('HOST')
I can submit a PR but I figured it warrants some discussion here. Not sure the right thing to do. Maybe we should add one more key to retain backward compatibility?
The text was updated successfully, but these errors were encountered:
Had an issue a few days ago where I migrated an old project onto Nginx. The configuration for the project is a wildcard vhost. Had it running in apache fine for a few years and replicated the configuration in nginx.
The nginx conf file for the vhost looks something like this
server *.domain.com {...
In my F3/PHP code, I parse out the subdomain from
$f3->get('HOST')
and take a specific action. After the change this stopped working. Seems that I was getting*.domain.com
as the return value for$f3->get('HOST')
instead ofsub.domain.com
Ended up changing my code to parse from
$_SERVER['HTTP_HOST']
instead of$f3->get('HOST')
I can submit a PR but I figured it warrants some discussion here. Not sure the right thing to do. Maybe we should add one more key to retain backward compatibility?
The text was updated successfully, but these errors were encountered: