This commit is contained in:
Fred KISSIE
2026-09-10 20:08:47 +02:00
parent 30ca3e7e97
commit 9e85b39fd5
14 changed files with 1147 additions and 61 deletions
+12 -2
View File
@@ -258,8 +258,18 @@ export const redirects = sqliteTable("redirects", {
}),
niceId: text("niceId").notNull(),
name: text("name").notNull(),
sourcePath: text("sourcePath").notNull(),
destinationUrl: text("destinationUrl"),
destinationDomain: text("destinationDomain").notNull(),
pathMatchType: text("pathMatchType")
.$type<"exact" | "prefix" | "regex">()
.notNull()
.default("regex"), // exact, prefix, regex
matchPath: text("matchPath").notNull().default("*"),
rewritePath: text("rewritePath"), // if set, rewrites the path to this value,
// else, the original path will be kept
rewritePathType: text("rewritePathType").$type<
"exact" | "prefix" | "regex" | "stripPrefix"
>(), // exact, prefix, regex, stripPrefix
permanent: integer("permanent", { mode: "boolean" })
.notNull()
.default(false),