Replies: 1 comment 4 replies
-
@andrekiba The BFF host is a regular ASP.NET Core application, so you can add a minimal API endpoint that can proxy information from your CDN through the BFF Host. app.Map("/", (IWebHostEnvironment env) =>
{
// get web content root
var webRootPath = env.WebRootPath;
// read the file from anywhere, including a CDN
var file = File.OpenRead(Path.Combine(webRootPath, "_index.html"));
return Results.Stream(file, "text/html");
}); If you have no static files on the host, you can remove the static files middleware. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks in advance.
Is it possible to have an example about the Serve the index page from the BFF host ?
I'm thinking if using Yarp to serve the
index.html
could be a way or maybe using theUseStaticFiles()
with a customIFileProvider
that pulls theindex.html
from the CDN.Do you have a suggestion?
Beta Was this translation helpful? Give feedback.
All reactions