[CORS] Add CORS support - UNTESTED

@brndnmtthws Feel like giving this a quick look?

I haven't compiled this yet, much less tested it. No idea if it works.