Skip to content

Commit

Permalink
fix(gallery): add Accept-Ranges for Chrome seeking
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed May 31, 2023
1 parent 66f6eed commit b3fe3e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/overlays/gallery.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import path from 'path';

import { Gallery as GalleryEntity } from '@entity/gallery';
import { AppDataSource } from '~/database';

import Overlay from './_interface';

import { AppDataSource } from '~/database';
import { debug } from '~/helpers/log';
import { app } from '~/helpers/panel';
import { adminEndpoint } from '~/helpers/socket';
Expand Down Expand Up @@ -51,6 +51,7 @@ class Gallery extends Overlay {
'Content-Type': file.type,
'Content-Length': data.length,
'Cache-Control': 'public, max-age=31536000',
'Accept-Ranges': 'bytes',
'ETag': req.params.id + '-' + request.size,
});
res.end(data);
Expand Down

0 comments on commit b3fe3e2

Please sign in to comment.