Skip to content

Commit

Permalink
Merge pull request #22 from kjloveless/updates
Browse files Browse the repository at this point in the history
reserved subdomains on domains
  • Loading branch information
kjloveless authored Oct 13, 2024
2 parents 3d5374f + ecd176f commit 93153a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ export default async function HomePage(_req: Request, ctx: RouteContext) {
throw new Error("slur");
}

if (domain === "army.social" && RESERVED.includes(handle)) {
// TODO: probably want to add some way for the forker to add their
// domain to this reserved list, or config their on.. deno task <script>?
if (
(domain === "army.social" || domain === "deno.social" ||
domain === "sad.blue") &&
RESERVED.includes(handle)
) {
throw new Error("reserved");
}

Expand Down
2 changes: 2 additions & 0 deletions util/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ export const RESERVED = [
"Pic",
"New",
"Babys",
"www",
"WWW",
].map((x) => x.toLowerCase());

0 comments on commit 93153a6

Please sign in to comment.