Skip to content

Commit

Permalink
fix: correct ssl problems
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Dec 5, 2024
1 parent 090bdf4 commit c42e97f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 13 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react-day-picker": "^8.10.0",
"react-dom": "^18.2.0",
"react-lazy-load": "^4.0.1",
"ssl-root-cas": "^1.3.1",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7"
},
Expand Down
45 changes: 35 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import GoogleAnalytics from "@/components/GoogleAnalytics";
import { Header } from "@/components/header";
import { ScrollToTop } from "@/components/scroll-to-top";
import { Toaster } from "@/components/ui/toaster";
// @ts-expect-error types are not provided by this library
import sslRootCAs from "ssl-root-cas";

const inter = Inter({ subsets: ["latin"], fallback: ["sans-serif"] });

Expand Down Expand Up @@ -40,9 +42,11 @@ export default function RootLayout({
}: {
children: React.ReactNode;
}) {
if (process.env.NODE_ENV === "development") {
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
}
/**
* Adds additional (missing) certificates to Node
* {@link https://stackoverflow.com/a/22263280}
*/
sslRootCAs.inject();

return (
<html lang="en">
Expand Down

0 comments on commit c42e97f

Please sign in to comment.