Release 0.5.1
This commit is contained in:
1 parent
5a9d7735d4
commit
fb24d171ae
36 files changed
+5099
-263
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { getPresentationPreviewImage } from '#lib/server/live.js';
|
||||
|
||||
export const GET: RequestHandler = async ({ params }) => {
|
||||
const image = await getPresentationPreviewImage(params.token);
|
||||
if (!image) error(404, 'Vorschaubild nicht verfügbar');
|
||||
return new Response(new Uint8Array(image.data), {
|
||||
headers: {
|
||||
'Content-Type': image.mimeType,
|
||||
'Content-Length': String(image.data.byteLength),
|
||||
'Cache-Control': 'private, max-age=300',
|
||||
'X-Content-Type-Options': 'nosniff',
|
||||
'Cross-Origin-Resource-Policy': 'same-origin',
|
||||
'Content-Security-Policy': "default-src 'none'; sandbox"
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user