Not even sure but I can reverse proxy the site now so hey

This commit is contained in:
Gabriel Brown 2024-07-20 13:00:27 -05:00
parent 1b6d447c36
commit 088482bb62
5 changed files with 2874 additions and 2311 deletions

View File

@ -4,7 +4,34 @@
*/ */
await import("./src/env.js"); await import("./src/env.js");
const cspHeader = `
default-src 'self';
script-src 'self' 'unsafe-eval' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
img-src 'self' blob: data:;
font-src 'self';
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests;
`
/** @type {import("next").NextConfig} */ /** @type {import("next").NextConfig} */
const config = {}; const config = {
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Content-Security-Policy",
value: cspHeader.replace(/\n/g, ''),
},
],
},
];
},
};
export default config; export default config;

View File

@ -18,33 +18,33 @@
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"drizzle-orm": "^0.30.10", "drizzle-orm": "^0.30.10",
"geist": "^1.3.0", "geist": "^1.3.1",
"lucide-react": "^0.411.0", "lucide-react": "^0.411.0",
"mysql2": "^3.9.7", "mysql2": "^3.10.3",
"next": "^14.2.4", "next": "^14.2.5",
"next-auth": "5.0.0-beta.19", "next-auth": "5.0.0-beta.19",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"server-only": "^0.0.1", "server-only": "^0.0.1",
"tailwind-merge": "^2.4.0", "tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"zod": "^3.23.3" "zod": "^3.23.8"
}, },
"devDependencies": { "devDependencies": {
"@types/eslint": "^8.56.10", "@types/eslint": "^8.56.10",
"@types/node": "^20.14.10", "@types/node": "^20.14.11",
"@types/react": "^18.3.3", "@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.1.1", "@typescript-eslint/parser": "^7.16.1",
"drizzle-kit": "^0.21.4", "drizzle-kit": "^0.21.4",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-next": "^14.2.4", "eslint-config-next": "^14.2.5",
"eslint-plugin-drizzle": "^0.2.3", "eslint-plugin-drizzle": "^0.2.3",
"postcss": "^8.4.39", "postcss": "^8.4.39",
"prettier": "^3.3.2", "prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5", "prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.3", "tailwindcss": "^3.4.6",
"typescript": "^5.5.3" "typescript": "^5.5.3"
}, },
"ct3aMetadata": { "ct3aMetadata": {

4979
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ export const env = createEnv({
.enum(["development", "test", "production"]) .enum(["development", "test", "production"])
.default("development"), .default("development"),
API_KEY: z.string(), API_KEY: z.string(),
AUTH_TRUST_HOST: z.boolean().default(false),
AUTH_SECRET: z.string(), AUTH_SECRET: z.string(),
AUTH_MICROSOFT_ENTRA_ID_ID: z.string(), AUTH_MICROSOFT_ENTRA_ID_ID: z.string(),
AUTH_MICROSOFT_ENTRA_ID_SECRET: z.string(), AUTH_MICROSOFT_ENTRA_ID_SECRET: z.string(),
@ -35,6 +36,7 @@ export const env = createEnv({
DATABASE_URL: process.env.DATABASE_URL, DATABASE_URL: process.env.DATABASE_URL,
NODE_ENV: process.env.NODE_ENV, NODE_ENV: process.env.NODE_ENV,
API_KEY: process.env.API_KEY, API_KEY: process.env.API_KEY,
AUTH_TRUST_HOST: process.env.AUTH_TRUST_HOST,
AUTH_SECRET: process.env.AUTH_SECRET, AUTH_SECRET: process.env.AUTH_SECRET,
AUTH_MICROSOFT_ENTRA_ID_ID: process.env.AUTH_MICROSOFT_ENTRA_ID_ID, AUTH_MICROSOFT_ENTRA_ID_ID: process.env.AUTH_MICROSOFT_ENTRA_ID_ID,
AUTH_MICROSOFT_ENTRA_ID_SECRET: process.env.AUTH_MICROSOFT_ENTRA_ID_SECRET, AUTH_MICROSOFT_ENTRA_ID_SECRET: process.env.AUTH_MICROSOFT_ENTRA_ID_SECRET,

1
src/middleware.ts Normal file
View File

@ -0,0 +1 @@
export { auth as middleware } from "~/auth"