Updates
This commit is contained in:
@@ -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}/ ...`);
|
||||
|
||||
Reference in New Issue
Block a user