For full site acceleration, the following setup is recommended:
CDN Hostname: www.domain.com
CDN Origin: Origin IP address - example: 127.0.0.1 (origin ip)
Do not use "domain.com" as the CDN origin as it would possibly bring up the issues like infinite redirection loop, x-forwarded-for not working, etc.