Patch Controller to send headers properly, and fix JS CDN scheme