Skip to content

Commit

Permalink
MangaChan : add referer for images (#5932)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jun 24, 2023
1 parent 213b32b commit dd5a705
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/web/mjs/connectors/MangaChan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down Expand Up @@ -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)));
}
}
}

0 comments on commit dd5a705

Please sign in to comment.