You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
GeoTIFFSource does not accept any custom client despite geotiff.js supporting this behaviour using the method fromCustomClient (instead of fromUrl).
Proposal:
I propose that when constructing the GeoTIFFSource we allow the developer to specify a custom client.
Example use case:
In Angular it makes it possible to create a client based on Angulars' HttpClient which makes it possible to automatically add a JWT token to the header of each request using the HttpClients HttpInterceptors. This is very usefull when protecting COGs behind a protected reverse-proxy. Instead of manually updating the sources sourceOptions on every token refresh.
I would love any feedback on this propoasl, and I'm willing to contribute the code to make it happend. (It's just a few lines of code as I see it. no need to code any clients. Just add the possibility to overwrite with your own).
The text was updated successfully, but these errors were encountered:
I don't think we'd want to expose GeoTIFF's BaseClient and BaseResponse APIs. But we could accept a function (headers: HeadersInit, abortSignal: AbortSignal): Promise<Response> as url option.
I don't think we'd want to expose GeoTIFF's BaseClient and BaseResponse APIs. But we could accept a function (headers: HeadersInit, abortSignal: AbortSignal): Promise<Response> as url option.
Background:
GeoTIFFSource does not accept any custom client despite geotiff.js supporting this behaviour using the method
fromCustomClient
(instead offromUrl
).Proposal:
I propose that when constructing the GeoTIFFSource we allow the developer to specify a custom client.
Example use case:
In Angular it makes it possible to create a client based on Angulars' HttpClient which makes it possible to automatically add a JWT token to the header of each request using the HttpClients HttpInterceptors. This is very usefull when protecting COGs behind a protected reverse-proxy. Instead of manually updating the sources sourceOptions on every token refresh.
Sources:
I would love any feedback on this propoasl, and I'm willing to contribute the code to make it happend. (It's just a few lines of code as I see it. no need to code any clients. Just add the possibility to overwrite with your own).
The text was updated successfully, but these errors were encountered: