brianchandotcom/liferay-portal — pull request #7639 by samuelkong (2012-11-12 05:32:11+00:00)
Title: LPS-30940 Injection with cdn_host parameter

It seems like your idea to use the "cdn_enabled" parameter should work given my understanding of your use case. You can set this URL parameter during runtime to "0" and all the URL will use the default, which should be www.liferay.com in this case.

If you set the host to other values, I'll need to come up with another solution. (May also need to IM you for more details on your use case.)