From e13c5f6744e9a15c6249ea056aaf109262cdcccd Mon Sep 17 00:00:00 2001 From: ale Date: Tue, 24 Sep 2024 00:15:05 +0200 Subject: [PATCH] application/gzip --- lib/apiswagger.js | 4 ++-- public/main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/apiswagger.js b/lib/apiswagger.js index 315b571..84141ce 100644 --- a/lib/apiswagger.js +++ b/lib/apiswagger.js @@ -496,11 +496,11 @@ module.exports = (app, client) => { * 200: * description: A file compressed with gzip. * content: - * application/octect-stream + * application/gzip: */ app.use('/api/download_index', async (req, res) => { try { - res.setHeader('Content-Type', 'application/x-gzip') + res.setHeader('Content-Type', 'application/gzip') res.setHeader('Content-disposition', 'attachment; filename=fediblock-index.json.gz') const result = await client.search({ index: constant.index, diff --git a/public/main.js b/public/main.js index be2928c..7143ddb 100644 --- a/public/main.js +++ b/public/main.js @@ -117,7 +117,7 @@ document.addEventListener('DOMContentLoaded', function () { a = document.createElement('a') a.download = 'fediblock-index.json.gz' a.href = URL.createObjectURL(res) - a.type = 'application/x-gzip' + a.type = 'application/gzip' a.target = '_blank' a.dispatchEvent(new MouseEvent('click')) document.getElementById('loader-content').style.display = 'none'