aboutsummaryrefslogtreecommitdiff
path: root/src/routes/api/proxy/+server.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-28 17:29:11 -0800
committerFuwn <[email protected]>2023-12-28 17:29:11 -0800
commita7c611ff57c99846a74bce374937a07851d7b388 (patch)
tree604bf56bcd99a18084468f2383471e1663cb9856 /src/routes/api/proxy/+server.ts
parentchore(manga): no proxy dev (diff)
downloaddue.moe-a7c611ff57c99846a74bce374937a07851d7b388.tar.xz
due.moe-a7c611ff57c99846a74bce374937a07851d7b388.zip
refactor(api): remove unused api and mangadex
Diffstat (limited to 'src/routes/api/proxy/+server.ts')
-rw-r--r--src/routes/api/proxy/+server.ts18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/routes/api/proxy/+server.ts b/src/routes/api/proxy/+server.ts
deleted file mode 100644
index c4bf74a6..00000000
--- a/src/routes/api/proxy/+server.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export const GET = async ({ url }) => {
- const response = await fetch(url.searchParams.get('url') as string);
- const contentType = response.headers.get('content-type') as string;
-
- if (contentType.includes('application/json')) {
- return Response.json(await response.json(), {
- headers: { 'Content-Type': 'application/json' }
- });
- } else if (contentType.includes('text/html') || contentType.includes('text/plain')) {
- return new Response(await response.text(), {
- headers: { 'Content-Type': contentType }
- });
- } else {
- return new Response(await response.blob(), {
- headers: { 'Content-Type': contentType }
- });
- }
-};