When I run locally my static files under wwwroot are served up without problem as follows:
https://localhost:5001/content/blah...
However, under aks (Azure Kubernetes Service, I get 404 not found when doing this:
https://{myDns}/{myAksService}/content/blah...
app.UseStaticFiles(); // Serve files from wwwroot
app.UseStaticFiles(new StaticFileOptions
{
FileProvider =
new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot/.well-known")),
RequestPath = new PathString("/.well-known"),
ServeUnknownFileTypes = true // serve extensionless file
});
My understanding is that the first UseStaticFiles should result in serving up the files under wwwroot
The .well-known files which are called out in separate UseStaticFiles are served up without issue under aks
https://{myDns}/{myAksService}/.well-known/apple-developer-merchantid-domain-association.txt