add always allow list

This commit is contained in:
sky
2026-01-05 19:54:20 -05:00
parent e2a790fa99
commit 48a8175f04

View File

@ -2,6 +2,12 @@ import { Database } from "bun:sqlite";
import express from "express";
const port = process.env.PORT || 3000;
const alwaysAllow = [
"selenite.cc",
"selenite.skys.day",
"selenite.skysthelimit.dev"
]
const db = new Database("links.sqlite");
db.exec("PRAGMA journal_mode = WAL;");
@ -64,6 +70,9 @@ app.get("/check", async (req, res) => {
} catch (error) {
return res.status(400).end();
}
if(alwaysAllow.includes(domain.host)) {
return res.status(200).end();
}
const hostname = domain.hostname.toLowerCase();
if (hostname.split(".").length > 5) {