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
I am using an NGINX web server with a regular expression to match multiple host names, and the SERVER_NAME returned is the regular expression, not the actual host name requested/used. This caused an interesting (to me) issue because Google of course did not like the regular expression as the redirect URI.
I fixed this for my site by changing this $baseURL = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
to this $baseURL = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
I am not sure if this is a universally wholesome change or if it introduces problems for a different configuration. Just sharing in case it is helpful to someone else.
Thanks
The text was updated successfully, but these errors were encountered:
I am using an NGINX web server with a regular expression to match multiple host names, and the SERVER_NAME returned is the regular expression, not the actual host name requested/used. This caused an interesting (to me) issue because Google of course did not like the regular expression as the redirect URI.
I fixed this for my site by changing this
$baseURL = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
to this
$baseURL = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
I am not sure if this is a universally wholesome change or if it introduces problems for a different configuration. Just sharing in case it is helpful to someone else.
Thanks
The text was updated successfully, but these errors were encountered: