fix: remove x-file-name for ZHONGWEN 错误
This commit is contained in:
parent
4d39b22bdd
commit
a9f0170775
@ -9,6 +9,10 @@
|
||||
"key": "page-proxy",
|
||||
"entry": "dist/app.js",
|
||||
"type": "pm2-system-app",
|
||||
"runtime": [
|
||||
"client",
|
||||
"server"
|
||||
],
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
|
@ -75,14 +75,12 @@ const getAiProxy = async (req: IncomingMessage, res: ServerResponse, opts: Proxy
|
||||
const contentLength = stat.size;
|
||||
const etag = stat.etag;
|
||||
const lastModified = stat.lastModified.toISOString();
|
||||
const fileName = objectName.split('/').pop();
|
||||
|
||||
const objectStream = await minioClient.getObject(bucketName, objectName);
|
||||
const headers = {
|
||||
'Content-Length': contentLength,
|
||||
etag,
|
||||
'last-modified': lastModified,
|
||||
'x-file-name': fileName,
|
||||
...filterMetaData,
|
||||
};
|
||||
|
||||
@ -194,7 +192,7 @@ export const postProxy = async (req: IncomingMessage, res: ServerResponse, opts:
|
||||
};
|
||||
export const getObjectName = async (req: IncomingMessage, opts?: { checkOwner?: boolean }) => {
|
||||
const _u = new URL(req.url, 'http://localhost');
|
||||
const pathname = _u.pathname;
|
||||
const pathname = decodeURIComponent(_u.pathname);
|
||||
const params = _u.searchParams;
|
||||
const { user, app } = getUserFromRequest(req);
|
||||
const checkOwner = opts?.checkOwner ?? true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user