Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion middleware/01.og.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { placeImage, placeImagePaths, siteName, siteUrl, titleSuffix } from "#sr

export default defineMiddleware(async (c, next) => {
await next();
if (!c.res.headers.get("content-type")?.includes("text/html")) return;
// Error pages come from Void, without the site's title suffix, and are not shared.
if (!c.res.ok || !c.res.headers.get("content-type")?.includes("text/html")) return;

const path = c.req.path.endsWith("/") ? c.req.path : `${c.req.path}/`;
const record = records.find((r) => r.path === path);
Expand Down
Loading