mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-18 02:35:56 +08:00
fix: use 'no-content' (#1154)
* fix: use 'no-content' in x-respond-with * fix: use 'no-content' in x-respond-with
This commit is contained in:
parent
51109e01d2
commit
3d29b3069a
@ -91,7 +91,7 @@ export class SearcherHost extends RPCHost {
|
||||
const uid = await auth.solveUID();
|
||||
// Return content by default
|
||||
const respondWith = ctx.req.get('X-Respond-With') ?? 'content';
|
||||
const crawlWithoutContent = !respondWith.includes('content');
|
||||
const crawlWithoutContent = respondWith.includes('no-content');
|
||||
|
||||
let chargeAmount = 0;
|
||||
const noSlashPath = decodeURIComponent(ctx.req.path).slice(1);
|
||||
@ -352,7 +352,7 @@ export class SearcherHost extends RPCHost {
|
||||
if (withContent) {
|
||||
result.content = ['html', 'text', 'screenshot'].includes(mode) ? undefined : '';
|
||||
}
|
||||
if (mode.includes('favicon')) {
|
||||
if (mode.includes('no-content')) {
|
||||
const url = new URL(upstreamSearchResult.link);
|
||||
result.favicon = await this.getFavicon(url.origin);
|
||||
dataItems.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user