Added external embeds
This commit is contained in:
parent
5972139552
commit
516a054c31
6 changed files with 70 additions and 16 deletions
11
src/routes/embed/+server.js
Normal file
11
src/routes/embed/+server.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
/** @type {import('./$types').RequestHandler} */
|
||||
export async function GET({ url, fetch }) {
|
||||
const urlParam = url.searchParams.get('url');
|
||||
|
||||
const output = await fetch(urlParam);
|
||||
|
||||
return new Response(await output.blob(), {'headers': {
|
||||
'Content-Type': output.headers.get("Content-Type")
|
||||
}});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue