🔒 (security) security improvement
This commit is contained in:
@ -1,29 +1,29 @@
|
||||
type BuildMeta = {
|
||||
title?: string;
|
||||
description?: string;
|
||||
image?: string;
|
||||
};
|
||||
|
||||
const appName = process.env.APP_NAME;
|
||||
export const defaultMeta = {
|
||||
title: appName || "Unknown App",
|
||||
description: "Interactive community",
|
||||
};
|
||||
|
||||
export const buildMeta = ({ title, description, image }: BuildMeta) => {
|
||||
return {
|
||||
title: title ? `${title} - ${appName}` : defaultMeta.title,
|
||||
description: description || defaultMeta.description,
|
||||
openGraph: {
|
||||
title,
|
||||
description,
|
||||
images: image ? [image] : ["/default-og.png"],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title,
|
||||
description,
|
||||
images: image ? [image] : ["/default-og.png"],
|
||||
},
|
||||
};
|
||||
};
|
||||
type BuildMeta = {
|
||||
title?: string;
|
||||
description?: string;
|
||||
image?: string;
|
||||
};
|
||||
|
||||
const appName = process.env.APP_NAME;
|
||||
export const defaultMeta = {
|
||||
title: appName || "Unknown App",
|
||||
description: "Interactive community",
|
||||
};
|
||||
|
||||
export const buildMeta = ({ title, description, image }: BuildMeta) => {
|
||||
return {
|
||||
title: title ? `${title} - ${appName}` : defaultMeta.title,
|
||||
description: description || defaultMeta.description,
|
||||
openGraph: {
|
||||
title,
|
||||
description,
|
||||
images: image ? [image] : ["/default-og.png"],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title,
|
||||
description,
|
||||
images: image ? [image] : ["/default-og.png"],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
export const routes = {
|
||||
home: "/",
|
||||
login: "/login",
|
||||
signup: "/signup",
|
||||
explore: "/explore",
|
||||
trending: "/trending",
|
||||
genres: "/genres",
|
||||
schedule: "/schedule",
|
||||
};
|
||||
export const routes = {
|
||||
home: "/",
|
||||
login: "/login",
|
||||
signup: "/signup",
|
||||
explore: "/explore",
|
||||
trending: "/trending",
|
||||
genres: "/genres",
|
||||
schedule: "/schedule",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user