imageflow-dotnet-server icon indicating copy to clipboard operation
imageflow-dotnet-server copied to clipboard

Reverse proxy to a WebDAV file source

Open peaeater opened this issue 7 months ago • 1 comments

I currently use imageflow-dotnet to transform images served from the local disk from a location mapped to a "/media/" prefix via the ImageflowMiddlewareOptions.MapPath method. Files that aren't images are served via UseStaticFiles with a PhysicalFileProvider mapped to the same prefix.

I now am being asked to work with a reverse proxy (YARP) to a WebDAV file source scenario, where WebDAV uses Basic authentication. Human-friendly non-image file URLs won't be a problem, but how do I get Imageflow middleware to handle the image files and retain human-friendly URLs? Should I switch to imageflow-dotnet-server and use the RemoteReader? I can pass it an HttpClient with the 'Authorization' header set, but I'm flummoxed as to whether the browser can send in "/media/abc/123.jpg" and somehow have Imageflow fetch it from "https://1.2.3.4:5006/abc/123.jpg".

Unless... I've also seen the CustomBlob example. If the RemoteReader is not the answer, is it then possible to create my own custom service based on IBlobProvider?

peaeater avatar Jul 05 '24 16:07 peaeater