diff --git a/web/src/core/services/getImageUrl.ts b/web/src/core/services/getImageUrl.ts index d1281b521..35e110acb 100644 --- a/web/src/core/services/getImageUrl.ts +++ b/web/src/core/services/getImageUrl.ts @@ -12,7 +12,7 @@ export const getImageUrl = (args: GetImageUrlArgs): string => { return `https://${ type === 'gallery' ? 'i' : 't' - }.nhentai.net/galleries/${mediaId}/${ + }4.nhentai.net/galleries/${mediaId}/${ type === 'cover' ? 'cover' : `${page}${type === 'thumbnail' ? 't' : ''}` }.${image.t === 'p' ? 'png' : image.t === 'g' ? 'gif' : Number(mediaId) > 3110425 ? 'webp' : 'jpg'}` } diff --git a/web/src/routes/api/_image/+server.ts b/web/src/routes/api/_image/+server.ts index d6e00aa3c..61c081c91 100644 --- a/web/src/routes/api/_image/+server.ts +++ b/web/src/routes/api/_image/+server.ts @@ -6,7 +6,24 @@ import type { RequestHandler } from './$types' import {URL} from "node:url"; const requestHandler = createRequestHandler({ - remoteDomains: ['i.nhentai.net', 't.nhentai.net'], + remoteDomains: [ + 'i.nhentai.net', + 'i1.nhentai.net', + 'i2.nhentai.net', + 'i3.nhentai.net', + 'i4.nhentai.net', + 'i5.nhentai.net', + 'i6.nhentai.net', + 'i7.nhentai.net', + 't.nhentai.net', + 't1.nhentai.net', + 't2.nhentai.net', + 't3.nhentai.net', + 't4.nhentai.net', + 't5.nhentai.net', + 't6.nhentai.net', + 't7.nhentai.net', + ], allowedDomains: env.IMAGE_DOMAIN !== undefined ? [env.IMAGE_DOMAIN] : undefined, })