I have setup CORS on my node.js server on port 5000 as follows:
var app = express(); app.use(cors()); //normal CORS app.options(\'*\', cors()); //preflight
CORS doesn't work using the file protocol because there is no server there to send back the requisite headers. Your solution of using a server is the only way to get CORS to work.
file