How to add a http header to openlayers3 requests?

Answered on github. By default, image loading happens like this: img.src=”“; – that is, we set the src attribute of an Image to the image url. In this case, you don’t have an opportunity to set the headers for the request. You can override this behavior by calling source.setTileLoadFunction(customLoader). This assumes you are working with … Read more