forked from mirrors/misskey
Merge commit from fork
This commit is contained in:
parent
d323fe00d0
commit
1eac4ccf51
1 changed files with 4 additions and 8 deletions
|
|
@ -115,19 +115,15 @@ export class UrlPreviewService {
|
|||
}
|
||||
|
||||
private async fetchSummary(url: string, meta: MiMeta, lang?: string): Promise<SummalyResult> {
|
||||
const agent = this.config.proxy
|
||||
? {
|
||||
http: this.httpRequestService.httpAgent,
|
||||
https: this.httpRequestService.httpsAgent,
|
||||
}
|
||||
: undefined;
|
||||
|
||||
const { summaly } = await import('@misskey-dev/summaly');
|
||||
|
||||
return summaly(url, {
|
||||
followRedirects: this.meta.urlPreviewAllowRedirect,
|
||||
lang: lang ?? 'ja-JP',
|
||||
agent: agent,
|
||||
agent: {
|
||||
http: this.httpRequestService.httpAgent,
|
||||
https: this.httpRequestService.httpsAgent,
|
||||
},
|
||||
userAgent: meta.urlPreviewUserAgent ?? this.summalyDefaultUserAgent,
|
||||
operationTimeout: meta.urlPreviewTimeout,
|
||||
contentLengthLimit: meta.urlPreviewMaximumContentLength,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue