Set CORS header on cache only if it has not been set already (fixes #2897)

Whelp.  Continuing on my quest to learn Python then.  Thanks for the tips! :)