I have a hosted blazor wasm app, and I want to deploy it under a sub-path like https://xxx.mydomain.com/blazor , with nginx.
I've deployed the blazor app on the server(127.0.0.1:5001) and finished the nginx configurations like below,
location /blazor {
proxy_pass http://127.0.0.1:5001;
limit_req zone=one burst=60 nodelay;
}
A hosted blazor wasm has two parts, server side(web api) and client side(blazor wasm). On the server side, I've configured UsePathBase("/blazor") in Startup.cs. If it's just a ASP.NET Core Web API app, it works. But the blazor app returns a lot of 404 http code of static files as the broswer still visits them with urls like https://xxx.mydomain.com/assets/xxx instead of https://xxx.mydomain.com/blazor/assets/xxx.
I've read issues like #14999 or #15464, but still not find a perfect answer. I think a related doc is required.
Any help? Thanks in advance!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I have a hosted blazor wasm app, and I want to deploy it under a sub-path like
https://xxx.mydomain.com/blazor, with nginx.I've deployed the blazor app on the server(
127.0.0.1:5001) and finished the nginx configurations like below,A hosted blazor wasm has two parts, server side(web api) and client side(blazor wasm). On the server side, I've configured
UsePathBase("/blazor")inStartup.cs. If it's just aASP.NET Core Web APIapp, it works. But the blazor app returns a lot of404http code of static files as the broswer still visits them with urls likehttps://xxx.mydomain.com/assets/xxxinstead ofhttps://xxx.mydomain.com/blazor/assets/xxx.I've read issues like #14999 or #15464, but still not find a perfect answer. I think a related doc is required.
Any help? Thanks in advance!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.