php - Change value of $_SERVER['HTTP_HOST'] on Bitnami Wordpress behind Azure CDN

one text

I have WordPress behind Azure CDN.

The current $_SERVER['HTTP_HOST'] points to the CDN's origin server resulting bypassing of the CDN.

I want to know what the best way of changing $_SERVER['HTTP_HOST'] is so that it defaults to the public URL?

Currently, I modified wp-config.php and added the following

$_SERVER['HTTP_HOST'] = 'FrontEndWebsite.com'; 

It appears to resolve the problem as the website paths are now correct.

I was wondering if this is the best practices way of doing it?

Thanks in advance.

Source