Skip to content

Commit

Permalink
fix: setting headers incorrectly for style.xsl
Browse files Browse the repository at this point in the history
Fixes #413
  • Loading branch information
harlan-zw committed Jan 27, 2025
1 parent f8ebd2e commit 5be8f99
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,12 @@ declare module 'vue-router' {
if (typeof config.runtimeCacheStorage === 'object')
routeRules.cache.base = 'sitemap'
}
nuxt.options.nitro.routeRules['/sitemap.xsl'] = {
headers: {
'Content-Type': 'application/xslt+xml',
},
if (config.xsl) {
nuxt.options.nitro.routeRules[config.xsl] = {
headers: {
'Content-Type': 'application/xslt+xml',
},
}
}
if (usingMultiSitemaps) {
nuxt.options.nitro.routeRules['/sitemap.xml'] = { redirect: '/sitemap_index.xml' }
Expand Down

0 comments on commit 5be8f99

Please sign in to comment.