I have JavaScript application in OpenLayers 3, and my base layer is created from local tiles. I work only in my computer so I do not know why I have CORS error.
The problem was actually solved by providing crossOrigin: null to OpenLayers OSM source:
var newLayer = new ol.layer.Tile({ source: new ol.source.OSM({ url: 'E:/Maperitive/Tiles/vychod/{z}/{x}/{y}.png', crossOrigin: null }) });