Skip to content

Commit e51c0eb

Browse files
committed
feat: 优化导出订阅/文件逻辑
1 parent 6971459 commit e51c0eb

4 files changed

Lines changed: 4 additions & 1 deletion

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.36.18",
3+
"version": "2.36.19",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"packageManager": "pnpm@11.0.9",

backend/src/restful/collections.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function getCollection(req, res) {
4646
if (collection) {
4747
if (raw) {
4848
res.set('content-type', 'application/json')
49+
.set('access-control-expose-headers', 'content-disposition')
4950
.set(
5051
'content-disposition',
5152
`attachment; filename="${encodeURIComponent(

backend/src/restful/file.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ function getWholeFile(req, res) {
424424
if (file) {
425425
if (raw) {
426426
res.set('content-type', 'application/json')
427+
.set('access-control-expose-headers', 'content-disposition')
427428
.set(
428429
'content-disposition',
429430
`attachment; filename="${encodeURIComponent(

backend/src/restful/subscriptions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ function getSubscription(req, res) {
256256
if (sub) {
257257
if (raw) {
258258
res.set('content-type', 'application/json')
259+
.set('access-control-expose-headers', 'content-disposition')
259260
.set(
260261
'content-disposition',
261262
`attachment; filename="${encodeURIComponent(

0 commit comments

Comments
 (0)