mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 19:15:04 +00:00
feat: add CSP header (#908)
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This commit is contained in:
@@ -2,13 +2,20 @@ import versionService from '$lib/services/version-service';
|
||||
import type { AppVersionInformation } from '$lib/types/application-configuration';
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
export const load: LayoutLoad = async () => {
|
||||
const currentVersion = versionService.getCurrentVersion();
|
||||
|
||||
let newestVersion = null;
|
||||
let isUpToDate = true;
|
||||
try {
|
||||
newestVersion = await versionService.getNewestVersion();
|
||||
isUpToDate = newestVersion === currentVersion;
|
||||
} catch {}
|
||||
|
||||
const versionInformation: AppVersionInformation = {
|
||||
currentVersion: versionService.getCurrentVersion(),
|
||||
newestVersion: await versionService.getNewestVersion(),
|
||||
isUpToDate: await versionService.isUpToDate()
|
||||
newestVersion,
|
||||
isUpToDate
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user