CodeIgniter Forums
getHost bug? - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: getHost bug? (/showthread.php?tid=78642)

getHost bug? - filit - 02-19-2021

I have a CI4 website on a Win IIS.

Default binding is "ci.test"
Additional binding is "en.test" (english version of the website)

When I navigate the website with en.test on the browser, a simple page that echoes $this->request->uri->getHost show me "ci.test".

Is it a bug or a desired behaviour?
Is there any way to get the real current hostname from the Request object?

Thank you

RE: getHost bug? - kenjis - 02-20-2021

Do you want $this->$request->getServer('HTTP_HOST') ?

RE: getHost bug? - filit - 02-20-2021

(02-20-2021, 03:15 AM)kenjis Wrote: Do you want $this->$request->getServer('HTTP_HOST') ?

That worked! Thank you!