From 4c9958959fb2a3945d52355e5cbd5d2ba8db7363 Mon Sep 17 00:00:00 2001 From: MikeZeDev Date: Sat, 24 Jun 2023 19:48:51 +0000 Subject: [PATCH] MangaChan : add referer for images (#5932) --- src/web/mjs/connectors/MangaChan.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/web/mjs/connectors/MangaChan.mjs b/src/web/mjs/connectors/MangaChan.mjs index 44ef0c5280..881f6d3a03 100644 --- a/src/web/mjs/connectors/MangaChan.mjs +++ b/src/web/mjs/connectors/MangaChan.mjs @@ -12,6 +12,7 @@ export default class MangaChan extends Connector { this.path = '/catalog'; this.queryChapters = 'table.table_cha tr td div.manga2 a'; this.queryPages = 'fullimg'; + this.requestOptions.headers.set('x-referer', this.url); } @@ -68,6 +69,6 @@ export default class MangaChan extends Connector { const uri = new URL(chapter.id, this.url); const request = new Request(uri, this.requestOptions ); const data = await Engine.Request.fetchUI(request, script); - return data.map(link => this.getAbsolutePath(link, request.url)); + return data.map(link => this.createConnectorURI(this.getAbsolutePath(link, request.url))); } -} \ No newline at end of file +}