Skip to content

Commit

Permalink
X-Frame-Options
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Jul 1, 2024
1 parent 43f6392 commit 6e88b08
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
10 changes: 10 additions & 0 deletions apps/dashboard/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const withBundleAnalyzer = bundleAnalyzer({

/** @type {import("next").NextConfig} */
const config = {
poweredByHeader: false,
reactStrictMode: true,
images: {
remotePatterns: [
Expand Down Expand Up @@ -51,6 +52,15 @@ const config = {
},
],
},
{
source: "/report/(.*)",
headers: [
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
],
},
];
},
};
Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/src/actions/ai/chat/tools/report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export function createReport({
const link = await dub.links.create({
url: `https://app.midday.ai/report/${data.id}`,
expiresAt,
rewrite: true,
});

const { data: linkData } = await supabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const createProjectReport = action(

const link = await dub.links.create({
url: `${params.baseUrl}/report/project/${data?.id}`,
rewrite: true,
});

const { data: linkData } = await supabase
Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/src/actions/report/create-report-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const createReportAction = action(createReportSchema, async (params) => {
const link = await dub.links.create({
url: `${params.baseUrl}/report/${data.id}`,
expiresAt: params.expiresAt,
rewrite: true,
});

const { data: linkData } = await supabase
Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/src/actions/share-file-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const shareFileAction = action(shareFileSchema, async (value) => {

const link = await dub.links.create({
url: response?.data?.signedUrl,
rewrite: true,
});

return link?.shortLink;
Expand Down
1 change: 1 addition & 0 deletions apps/website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import("next").NextConfig} */
const config = {
poweredByHeader: false,
reactStrictMode: true,
transpilePackages: ["@midday/ui", "@midday/tailwind"],
eslint: {
Expand Down

0 comments on commit 6e88b08

Please sign in to comment.