From f269e68baefdc03fad6d344888835b32f166c717 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Mon, 2 Feb 2026 12:12:51 +0100 Subject: [PATCH] Updates --- apps/auth-server/index.ts | 9 ++++++++- run.sh | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/auth-server/index.ts b/apps/auth-server/index.ts index fb59b54..d54f145 100644 --- a/apps/auth-server/index.ts +++ b/apps/auth-server/index.ts @@ -10,6 +10,7 @@ type AdminPagesAuth = { const server = Bun.serve({ port: AuthServerPort, + hostname: "0.0.0.0", fetch(req) { try { const url = new URL(req.url); @@ -20,6 +21,12 @@ const server = Bun.serve({ decrypt({ encryptedString: key! }), ) as AdminPagesAuth; + const decrptedUrl = decryptedKey.url; + + if (!srcOrigin || !decrptedUrl) { + throw new Error(`Origin Not Found!`); + } + return new Response("Auth Success!", { status: 200, }); @@ -31,4 +38,4 @@ const server = Bun.serve({ }, }); -console.log(`Auth Server running at http://localhost:${server.port}/`); +console.log(`Auth Server running at http://localhost:${server.port}/ ...`); diff --git a/run.sh b/run.sh index 00783a9..ee0ef9e 100644 --- a/run.sh +++ b/run.sh @@ -7,11 +7,14 @@ bun install -g pm2 # pm2 start apps/auth-server/index.ts --name cdr-auth-server --interpreter bun -docker run \ +docker kill cdr-auth-server || echo "Auth Server Not Running" +docker rm cdr-auth-server || echo "No Auth Server Found" + +docker run -d\ --name cdr-auth-server \ --hostname cdr-auth-server \ --network cdr-network \ - -d -w /app \ + -w /app \ -e DSQL_ENCRYPTION_PASSWORD=$DSQL_ENCRYPTION_PASSWORD \ -e DSQL_ENCRYPTION_SALT=$DSQL_ENCRYPTION_SALT \ --volume /root/.coderank/server:/app \