Re: CDN Support
Reply #10 –
I'm not sure if all of the services send the original IP in the connection.
Doing some more looking, Cloudflare and Incapsula set $_SERVER['HTTP_X_FORWARDED_FOR'] which seems to be the industry standard for these services. So a simple setting to enable CDN may be simply along the lines of.
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
That is somewhat unique to CDN's where you change your DNS to point to them and they choose the assets. If you are using, I'll say traditional CDN, such as cloudfront (amazon) then its not a problem since you are simply pointing certain assets (js/css/etc) to be fetched from the CDN URL.
For a traditional setup we would need the ability to point JS, CSS, Theme assests (images), avatars, and maybe attachment URL's, for the borg cloud style CDN simply a check the HTTP_X_FORWARDED_FOR header maybe all that is needed.