Skip to content

Commit 9d979c5

Browse files
committed
Return text/plain or image/* from /api/blob
1 parent f0ae2d7 commit 9d979c5

File tree

1 file changed

+2
-0
lines changed
  • src/app/api/blob/[owner]/[repository]/[...path]

1 file changed

+2
-0
lines changed

src/app/api/blob/[owner]/[repository]/[...path]/route.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export async function GET(req: NextRequest, { params }: { params: GetBlobParams
2828
const cacheExpirationInSeconds = 60 * 60 * 24 * 30 // 30 days
2929
headers.set("Content-Type", "image/*");
3030
headers.set("Cache-Control", `max-age=${cacheExpirationInSeconds}`)
31+
} else {
32+
headers.set("Content-Type", "text/plain");
3133
}
3234
return new NextResponse(file, { status: 200, headers })
3335
}

0 commit comments

Comments
 (0)