I'm creating a web app that has many domains pointing to the same app, but the content displayed will depend on the domain used to reach the app.
I am currently using
$_SERVER['HTTP_HOST']
to get the the domain and pull in the correct content.
I read this is not safe, because
The client can set HTTP_HOST to any arbitrary value it wants
How is this possible and how can I protect against this?