Openstatus www.openstatus.dev

chore: feeds are not available for protected pages

authored by

Washington and committed by
Maximilian Kaske
10aacc25 83691bca

+2 -1
+2 -1
apps/web/src/app/status-page/[domain]/feed/[type]/route.ts
··· 1 1 import { statusDict } from "@/data/incidents-dictionary"; 2 2 import { api } from "@/trpc/server"; 3 3 import { Feed } from "feed"; 4 - import { notFound } from "next/navigation"; 4 + import { notFound, unauthorized } from "next/navigation"; 5 5 import { getBaseUrl } from "../../utils"; 6 6 7 7 export const revalidate = 60; ··· 15 15 16 16 const page = await api.page.getPageBySlug.query({ slug: domain }); 17 17 if (!page) return notFound(); 18 + if (page.passwordProtected) return unauthorized(); 18 19 19 20 const baseUrl = getBaseUrl({ 20 21 slug: page.slug,