@@ -15,7 +15,6 @@ import { StatusError } from './status-error.js';
15
15
import { DownloadConfig , defaultDownloadConfig , downloadUrl } from './download.js' ;
16
16
import { getAgents } from './http.js' ;
17
17
import _contentDisposition from 'content-disposition' ;
18
- import { verifySignedProxyURL } from "./sign-proxy-url.js" ;
19
18
20
19
const _filename = fileURLToPath ( import . meta. url ) ;
21
20
const _dirname = dirname ( _filename ) ;
@@ -29,7 +28,6 @@ export type MediaProxyOptions = {
29
28
userAgent ?: string ;
30
29
allowedPrivateNetworks ?: string [ ] ;
31
30
maxSize ?: number ;
32
- signatureKey ?: string ;
33
31
} & ( {
34
32
proxy ?: string ;
35
33
} | {
@@ -56,7 +54,6 @@ export function setMediaProxyConfig(setting?: MediaProxyOptions | null) {
56
54
userAgent : setting . userAgent ?? defaultDownloadConfig . userAgent ,
57
55
allowedPrivateNetworks : setting . allowedPrivateNetworks ?? defaultDownloadConfig . allowedPrivateNetworks ,
58
56
maxSize : setting . maxSize ?? defaultDownloadConfig . maxSize ,
59
- signatureKey : setting . signatureKey ?? undefined ,
60
57
...( 'proxy' in setting ?
61
58
{ ...getAgents ( setting . proxy ) , proxy : ! ! setting . proxy } :
62
59
'httpAgent' in setting ? {
@@ -127,12 +124,6 @@ async function proxyHandler(request: FastifyRequest<{ Params: { url: string; };
127
124
return ;
128
125
}
129
126
130
- // 检查签名是否符合
131
- if ( ! ! config . signatureKey && ! verifySignedProxyURL ( request . url , config . signatureKey ) ) {
132
- reply . code ( 401 ) ;
133
- return ;
134
- }
135
-
136
127
// Create temp file
137
128
const file = await downloadAndDetectTypeFromUrl ( url ) ;
138
129
0 commit comments