Skip to content

Commit

Permalink
fix sitemap.xml.gz is not compressed #4622 (v2) (#4663)
Browse files Browse the repository at this point in the history
Co-authored-by: Alin Voinea <contact@avoinea.com>
  • Loading branch information
dobri1408 and avoinea committed Apr 11, 2023
1 parent c09c578 commit 2adb993
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions news/4663.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix sitemap.xml.gz not is not compressed @dobri1408
1 change: 0 additions & 1 deletion src/express-middleware/sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const sitemap = function (req, res, next) {
generateSitemap(req).then((sitemap) => {
if (Buffer.isBuffer(sitemap)) {
res.set('Content-Type', 'application/x-gzip');
res.set('Content-Encoding', 'gzip');
res.set('Content-Disposition', 'attachment; filename="sitemap.xml.gz"');
res.send(sitemap);
} else {
Expand Down

0 comments on commit 2adb993

Please sign in to comment.