From 0d9e7c3e3befd70c503cd21c34faf6b2026247e7 Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Sun, 23 Nov 2025 23:39:10 -0500 Subject: [PATCH 1/2] Fixed hardcoded nonsense in api config --- api/.env.example | 4 +++- api/src/index.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/.env.example b/api/.env.example index 8f50827..e11b26c 100644 --- a/api/.env.example +++ b/api/.env.example @@ -12,8 +12,10 @@ AUTH_CLIENT_ID= AUTH_CLIENT_SECRET= AUTH_REDIRECT_URI= AUTH_REVOCATION_URI= +AUTH_END_SESSION_URI= # AUTH_MODE=mock #uncomment this to bypass authentik # SERVER SETTINGS SERVER_PORT=3000 -CLIENT_URL= # This is whatever URL the client web app is served on \ No newline at end of file +CLIENT_URL= # This is whatever URL the client web app is served on +CLIENT_DOMAIN= #whatever.com \ No newline at end of file diff --git a/api/src/index.js b/api/src/index.js index 59c1381..8931d68 100644 --- a/api/src/index.js +++ b/api/src/index.js @@ -8,7 +8,7 @@ const app = express() app.use(morgan('dev')) app.use(cors({ - origin: ['https://aj17thdev.nexuszone.net', 'http://localhost:5173'], // your SPA origins + origin: [process.env.CLIENT_URL], // your SPA origins credentials: true })); @@ -32,7 +32,7 @@ app.use(session({ cookie: { httpOnly: true, sameSite: 'lax', - domain: 'nexuszone.net' + domain: process.env.CLIENT_DOMAIN } })); app.use(passport.authenticate('session')); From 3f9df22a5d4fb639d99fe201fff5a4916e87967b Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Wed, 26 Nov 2025 09:26:35 -0500 Subject: [PATCH 2/2] added API build command --- api/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/package.json b/api/package.json index 19d5e14..30735ce 100644 --- a/api/package.json +++ b/api/package.json @@ -8,7 +8,8 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "tsc && node ./built/api/src/index.js" + "dev": "tsc && node ./built/api/src/index.js", + "build" : "tsc" }, "dependencies": { "connect-sqlite3": "^0.9.16",