mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 10:05:53 +02:00
remove is base domain resource and flag
This commit is contained in:
parent
ff809416f5
commit
f1291d4d7d
15 changed files with 8 additions and 32 deletions
|
@ -88,7 +88,6 @@ export const resources = pgTable("resources", {
|
|||
emailWhitelistEnabled: boolean("emailWhitelistEnabled")
|
||||
.notNull()
|
||||
.default(false),
|
||||
isBaseDomain: boolean("isBaseDomain"),
|
||||
applyRules: boolean("applyRules").notNull().default(false),
|
||||
enabled: boolean("enabled").notNull().default(true),
|
||||
stickySession: boolean("stickySession").notNull().default(false),
|
||||
|
@ -629,4 +628,4 @@ export type Olm = InferSelectModel<typeof olms>;
|
|||
export type OlmSession = InferSelectModel<typeof olmSessions>;
|
||||
export type UserClient = InferSelectModel<typeof userClients>;
|
||||
export type RoleClient = InferSelectModel<typeof roleClients>;
|
||||
export type OrgDomains = InferSelectModel<typeof orgDomains>;
|
||||
export type OrgDomains = InferSelectModel<typeof orgDomains>;
|
||||
|
|
|
@ -97,7 +97,6 @@ export const resources = sqliteTable("resources", {
|
|||
emailWhitelistEnabled: integer("emailWhitelistEnabled", { mode: "boolean" })
|
||||
.notNull()
|
||||
.default(false),
|
||||
isBaseDomain: integer("isBaseDomain", { mode: "boolean" }),
|
||||
applyRules: integer("applyRules", { mode: "boolean" })
|
||||
.notNull()
|
||||
.default(false),
|
||||
|
@ -674,4 +673,4 @@ export type Idp = InferSelectModel<typeof idp>;
|
|||
export type ApiKey = InferSelectModel<typeof apiKeys>;
|
||||
export type ApiKeyAction = InferSelectModel<typeof apiKeyActions>;
|
||||
export type ApiKeyOrg = InferSelectModel<typeof apiKeyOrg>;
|
||||
export type OrgDomains = InferSelectModel<typeof orgDomains>;
|
||||
export type OrgDomains = InferSelectModel<typeof orgDomains>;
|
||||
|
|
|
@ -81,10 +81,6 @@ export class Config {
|
|||
parsedConfig.server.resource_access_token_headers.token;
|
||||
process.env.RESOURCE_SESSION_REQUEST_PARAM =
|
||||
parsedConfig.server.resource_session_request_param;
|
||||
process.env.FLAGS_ALLOW_BASE_DOMAIN_RESOURCES = parsedConfig.flags
|
||||
?.allow_base_domain_resources
|
||||
? "true"
|
||||
: "false";
|
||||
process.env.DASHBOARD_URL = parsedConfig.app.dashboard_url;
|
||||
process.env.FLAGS_DISABLE_LOCAL_SITES = parsedConfig.flags
|
||||
?.disable_local_sites
|
||||
|
|
|
@ -233,7 +233,6 @@ export const configSchema = z
|
|||
disable_signup_without_invite: z.boolean().optional(),
|
||||
disable_user_create_org: z.boolean().optional(),
|
||||
allow_raw_resources: z.boolean().optional(),
|
||||
allow_base_domain_resources: z.boolean().optional(),
|
||||
enable_integration_api: z.boolean().optional(),
|
||||
enable_redis: z.boolean().optional(),
|
||||
disable_local_sites: z.boolean().optional(),
|
||||
|
|
|
@ -19,7 +19,6 @@ const updateOrgParamsSchema = z
|
|||
const updateOrgBodySchema = z
|
||||
.object({
|
||||
name: z.string().min(1).max(255).optional()
|
||||
// domain: z.string().min(1).max(255).optional(),
|
||||
})
|
||||
.strict()
|
||||
.refine((data) => Object.keys(data).length > 0, {
|
||||
|
|
|
@ -307,8 +307,7 @@ async function createHttpResource(
|
|||
subdomain,
|
||||
http: true,
|
||||
protocol: "tcp",
|
||||
ssl: true,
|
||||
isBaseDomain: false
|
||||
ssl: true
|
||||
})
|
||||
.returning();
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ export async function traefikConfigProvider(
|
|||
http: resources.http,
|
||||
proxyPort: resources.proxyPort,
|
||||
protocol: resources.protocol,
|
||||
isBaseDomain: resources.isBaseDomain,
|
||||
subdomain: resources.subdomain,
|
||||
domainId: resources.domainId,
|
||||
// Site fields
|
||||
site: {
|
||||
|
@ -210,7 +210,7 @@ export async function traefikConfigProvider(
|
|||
wildCard = `*.${domainParts.slice(1).join(".")}`;
|
||||
}
|
||||
|
||||
if (resource.isBaseDomain) {
|
||||
if (!resource.subdomain) {
|
||||
wildCard = resource.fullDomain;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ async function copyInDomains() {
|
|||
}
|
||||
|
||||
let fullDomain = "";
|
||||
if (resource.isBaseDomain) {
|
||||
if (!resource.subdomain) {
|
||||
fullDomain = domain.baseDomain;
|
||||
} else {
|
||||
fullDomain = `${resource.subdomain}.${domain.baseDomain}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue