application/gzip
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
ale 2024-09-24 00:15:05 +02:00
parent 1811e4ed55
commit e13c5f6744
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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'