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'