C
C#2y ago
Anton

❔ ASP.NET Core reroute requests for static files to a different server

This is supposed to be implemented by Microsoft.AspNetCore.SpaServices.Extensions, like this guy does here https://github.com/MakotoAtsu/AspNetCore_Vite_Template However there's an issue: I want a) to be able to start the server separately, b) to use the manifest generated by Vite to provide the files. The code in the template above doesn't actually work as I need it to: it looks at the dist folder to get the available files, while what should actually happen is it should read in the manifest file generated by vite, which remaps the files correctly and whatnot. So I need a custom FileProvider. The problem with that is the method GetFileInfo, which returns an IFileInfo, which has to implement CreateReadStream(), which I have no idea why aspnet core needs in the first place, and I don't know how to implement it myself. The implementations provided by aspnet core deal with actual files on disk or embedded resources, but not files streamed over http, so idk what to do.
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Anton
Anton2y ago
yeah this might be good enough one question tho: is it possible to conditionally rebind the urls of image tags and style imports in razor views? is there some sort of plugin system to do this at compile time maybe? just dropping the question here, but I'll investigate on my own too of course startup time* this might work
Anton
Anton2y ago
I wonder if there is something similar just for attributes that expand into other attributes
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts