(hopefully) actually fix rh

This commit is contained in:
wearrrrr 2024-02-22 12:07:53 -06:00
parent 75d0e73836
commit 34fdf7c5ce
2 changed files with 6 additions and 6 deletions

View file

@ -17,8 +17,6 @@ const PORT = process.env.PORT || 3000;
const bare = createBareServer("/bare/");
console.log(chalk.gray("Starting Bare..."));
const rh = createRammerhead();
console.log(chalk.gray("Starting Rammerhead..."));
const rammerheadScopes = [
@ -35,15 +33,17 @@ const rammerheadScopes = [
"/editsession",
"/needpassword",
"/syncLocalStorage",
"/api/shuffleDict",
"/mainport",
"/api/shuffleDict"
];
const rammerheadSession = /^\/[a-z0-9]{32}/;
function shouldRouteRh(req) {
const url = new URL(req.url, "http://0.0.0.0");
return rammerheadScopes.includes(url.pathname) || rammerheadSession.test(url.pathname);
return (
rammerheadScopes.includes(url.pathname) ||
rammerheadSession.test(url.pathname)
);
}
function routeRhRequest(req, res) {

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/strict",
"exclude": ["node_modules/**", "dist/**"],
"exclude": ["node_modules/**/*", "dist/**"],
"compilerOptions": {
"verbatimModuleSyntax": false
}