This commit is contained in:
parent
1811e4ed55
commit
e13c5f6744
@ -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,
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user