Skip to content

Commit

Permalink
remote asset
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbos committed Nov 30, 2023
1 parent b28ec0a commit dfc48b3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/routes/(blank)/og/[show_number].jpg/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,9 @@ export const config = {
};

export async function GET({ url, params }) {
const file = path.join(
process.cwd(),
'src',
'routes',
'(blank)',
'og',
'[show_number].jpg',
'698.jpg'
);
const buf = await readFile(file);
const buf = await fetch(
'https://p201.p0.n0.cdn.getcloudapp.com/items/4guRB0vd/9dfc34a6-c197-4f10-b44d-e2c049824584.jpg?source=viewer&v=7dbdaa80953a2cf83f6b2caf6f5b5cea'
).then((x) => x.arrayBuffer());
return new Response(buf, {
status: 200,
headers: {
Expand Down

0 comments on commit dfc48b3

Please sign in to comment.