Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added X-Frame-Options DENY to vulnerable routes

Blue Mouse06852912f6db
diff --git a/app/routes/change-email.$id.tsx b/app/routes/change-email.$id.tsx
index e8c56f023..4c70262e5 100644
--- a/app/routes/change-email.$id.tsx
+++ b/app/routes/change-email.$id.tsx
@@ -1,6 +1,12 @@
import VerifyEmail from 'pages/Auth/VerifyEmail'
-import type { V2_MetaFunction } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
+import type { V2_MetaFunction, HeadersFunction } from '@remix-run/node'
+
+export const headers: HeadersFunction = () => {
+ return {
+ 'X-Frame-Options': 'DENY',
+ }
+}
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/app/routes/login.tsx b/app/routes/login.tsx
index 904f843a8..bf1ed22ac 100644
--- a/app/routes/login.tsx
+++ b/app/routes/login.tsx
@@ -1,5 +1,11 @@
import Signin from 'pages/Auth/Signin'
-import type { V2_MetaFunction } from '@remix-run/node'
+import type { V2_MetaFunction, HeadersFunction } from '@remix-run/node'
+
+export const headers: HeadersFunction = () => {
+ return {
+ 'X-Frame-Options': 'DENY',
+ }
+}
export const meta: V2_MetaFunction = () => {
return [
diff --git a/app/routes/password-reset.$id.tsx b/app/routes/password-reset.$id.tsx
index a3ec96c96..d08192ab1 100644
--- a/app/routes/password-reset.$id.tsx
+++ b/app/routes/password-reset.$id.tsx
@@ -1,6 +1,12 @@
import CreateNewPassword from 'pages/Auth/CreateNewPassword'
-import type { V2_MetaFunction } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
+import type { V2_MetaFunction, HeadersFunction } from '@remix-run/node'
+
+export const headers: HeadersFunction = () => {
+ return {
+ 'X-Frame-Options': 'DENY',
+ }
+}
export const sitemap: SitemapFunction = () => ({
exclude: true,
diff --git a/app/routes/recovery.tsx b/app/routes/recovery.tsx
index 6edf4ad62..f873388d3 100644
--- a/app/routes/recovery.tsx
+++ b/app/routes/recovery.tsx
@@ -1,5 +1,11 @@
import ForgotPassword from 'pages/Auth/ForgotPassword'
-import type { V2_MetaFunction } from '@remix-run/node'
+import type { V2_MetaFunction, HeadersFunction } from '@remix-run/node'
+
+export const headers: HeadersFunction = () => {
+ return {
+ 'X-Frame-Options': 'DENY',
+ }
+}
export const meta: V2_MetaFunction = () => {
return [
diff --git a/app/routes/signup.tsx b/app/routes/signup.tsx
index f893e90be..f801dea1c 100644
--- a/app/routes/signup.tsx
+++ b/app/routes/signup.tsx
@@ -1,6 +1,12 @@
import Singup from 'pages/Auth/Signup'
-import type { V2_MetaFunction } from '@remix-run/node'
import type { SitemapFunction } from 'remix-sitemap'
+import type { V2_MetaFunction, HeadersFunction } from '@remix-run/node'
+
+export const headers: HeadersFunction = () => {
+ return {
+ 'X-Frame-Options': 'DENY',
+ }
+}
export const sitemap: SitemapFunction = () => ({
priority: 0.9,