We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23c93a5 commit 62ac5ddCopy full SHA for 62ac5dd
apps/webapp/app/routes/healthcheck.tsx
@@ -7,11 +7,15 @@ export const loader: LoaderFunction = async ({ request }) => {
7
8
try {
9
const url = new URL("/", `http://${host}`);
10
+
11
+ if (request.headers.get("x-forwarded-proto") === "https") {
12
+ url.protocol = "https:";
13
+ }
14
// if we can connect to the database and make a simple query
15
// and make a HEAD request to ourselves, then we're good.
16
await Promise.all([
17
prisma.user.count(),
- fetch(url.toString(), { method: "HEAD" }).then((r) => {
18
+ fetch(url.href, { method: "HEAD" }).then((r) => {
19
if (!r.ok) return Promise.reject(r);
20
}),
21
]);
0 commit comments