You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: serve sitemap.xml in-memory via controller endpoint
Replace startup file-write of sitemap.xml with a dynamic /sitemap.xml
controller action. This eliminates the UnauthorizedAccessException caused
by the non-root app user being unable to write to /app/wwwroot/sitemap.xml.
- Add SitemapXml() action to HomeController using SitemapProvider.CreateSitemap
- Inject IOptions<SiteSettings> for base URL, IRouteConfigurationService via [FromServices]
- Remove GenerateAndSerializeSitemapXml (file-write) from SitemapXmlHelpers
- Remove unused DirectoryInfo parameter from GenerateSitemapXml
- Remove startup sitemap file-write from Program.cs; keep EnsureSitemapHealthy for fail-fast validation
- Update tests to match new GenerateSitemapXml signature
- Inline BuildKit secret in CI workflow (no temp PAT file)
Serving from memory is also more secure: no write permissions needed,
no stale file on disk, and the content is always fresh.
0 commit comments