Enable CORS support in a pre bootstrap task, fix #1491