From ac14a6fa1e6401a8ef568ad7632c85d9e579ebc7 Mon Sep 17 00:00:00 2001 From: David M <62346025+dispherical@users.noreply.github.com> Date: Wed, 30 Oct 2024 01:48:56 -0400 Subject: [PATCH] don't proxy if not modified --- cabinet/bun.lockb | Bin 39292 -> 39292 bytes cabinet/utils.ts | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/cabinet/bun.lockb b/cabinet/bun.lockb index e635b549a7ac336e26a7600bb7254efe7f6797f4..d15521a9b385dbf52c51e5237e907e5ef6dd4f64 100755 GIT binary patch delta 22 dcmeyfiRsTKrVXq)?2K`SdKP*{n|X2ybOC2H2d4l4 delta 22 acmeyfiRsTKrVXq)>`V+`u$d>PKo 10 * 60 * 1000; + } catch (err) { + console.error('Error:', err); + return false; + } +} export async function domainExists(domain: string) { const d = await prisma.domain.findFirst({ where: { @@ -90,6 +103,50 @@ export async function reloadCaddy() { } for (const domain of domains) { + if (!isModified(domain.username)) { + caddy.apps.http.servers.srv0.routes.push({ + "match": [ + { + "host": [ + domain.domain + ] + } + ], + "handle": [ + { + "handler": "subroute", + "routes": [ + { + + "handle": [ + { + "body": `To make this site visible, you'll need to open and resave your Caddyfile. This helps us save on memory. + + .MM. + ;MM. +KKc.lONMMWXk; ckXWMMWXk: 'xXWMMWXxoKKNMMXKKKK +MMXNo'. .lWM0.oWNo'. .,dWWldMW:. .:XMN'dMM:.... +MMW. :MMWMN. 'MMMMWc. .. cMM. +MMO .MMMMWXXXXXXXXXXWWO,dKNMNKOd:. cMM. +MMO .MMMMX .':OMMccMM. +MMO .MMKNMO. .kK0KKl .MMk:MM; +MMO .MMd.oXMKxoox0MXl ,OMNkdodkWWk. kWMKOOo +dd: .dd; ,xKNNKx, .o0XNX0l. .:oddc +- hackclub.app`, + "handler": "static_response", + "status_code": 200 + } + ] + + + } + ] + } + ], + "terminal": true + }) + continue; + } caddy.apps.http.servers.srv0.routes.push({ match: [ {