I am migrating from Mapbox 6 to Mapbox 10. I have a source, which needs a authorisation header in order to be accessed. Unfortunately, can't find a way to set the authorisation header for the source:
let vectorSource = VectorSource()
vectorSource.tiles = ["www.demo-endpoint.com/demo-tiles"]
// In order to access the endpoint, we need to set the authorisation header.
// Can't find an option to define it here
In Mapbox 6, I was able to register a URLProtocol
subclass to interfere the requests and set the header:
let config = MGLNetworkConfiguration.sharedManager.sessionConfiguration
config?.protocolClasses = [protocolClass.self] // Custom `URLProtocol` subclass
MGLNetworkConfiguration.sharedManager.sessionConfiguration = config
Is there such an option in Mapbox 10 ?