-
Notifications
You must be signed in to change notification settings - Fork 191
SER-330 Update flow for apex domains #2340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -30,8 +30,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{/if} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Typography.Text variant="m-400"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add the following record on your DNS provider. Note that DNS changes may take time to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
propagate fully. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add the following record on your DNS provider. Note that DNS changes may take up to 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hours to propagate fully. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Typography.Text> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -51,6 +51,18 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
text={$regionalConsoleVariables._APP_DOMAIN_TARGET_CNAME} /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Row.Base> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Row.Base {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Layout.Stack direction="row" alignItems="center" gap="xs"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CAA | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Badge variant="secondary" size="s" content="Optional" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}>@</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<InteractiveText variant="copy" isVisible text={`0 issue "certainly.com"`} /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need this dynamic |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Row.Base> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider making the CAA record value configurable. The CAA record value is hardcoded to Consider refactoring to make the CAA value configurable: <Table.Row.Base {root}>
<Table.Cell {root}>
<Layout.Stack direction="row" alignItems="center" gap="xs">
CAA
<Badge variant="secondary" size="s" content="Optional" />
</Layout.Stack>
</Table.Cell>
<Table.Cell {root}>@</Table.Cell>
<Table.Cell {root}>
- <InteractiveText variant="copy" isVisible text={`0 issue "certainly.com"`} />
+ <InteractiveText variant="copy" isVisible text={$regionalConsoleVariables._APP_DOMAIN_CAA_RECORD || `0 issue "certainly.com"`} />
</Table.Cell>
</Table.Row.Base> 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Root> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Layout.Stack gap="s" direction="row" alignItems="center"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Icon icon={IconInfo} size="s" color="--fgcolor-neutral-secondary" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,13 +9,26 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Alert | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} from '@appwrite.io/pink-svelte'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { isASubdomain } from '$lib/helpers/tlds'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export let domain: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export let verified = undefined; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export let variant: 'cname' | 'a' | 'aaaa'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export let service: 'sites' | 'general' = 'general'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface Props { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
domain: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
verified?: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
variant: 'cname' | 'a' | 'aaaa'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service?: 'sites' | 'general'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onNavigateToNameservers?: () => void; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
domain, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
verified = undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
variant, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
service = 'general', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
onNavigateToNameservers = undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}: Props = $props(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
let subdomain = domain?.split('.')?.slice(0, -2)?.join('.'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const isSubDomain = $derived.by(() => isASubdomain(domain)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function setTarget() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
switch (variant) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -44,8 +57,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{/if} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Typography.Text variant="m-400"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add the following record on your DNS provider. Note that DNS changes may take time to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
propagate fully. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Add the following record on your DNS provider. Note that DNS changes may take up to 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hours to propagate fully. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Typography.Text> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -62,16 +75,25 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<InteractiveText variant="copy" isVisible text={setTarget()} /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Row.Base> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Row.Base {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Layout.Stack direction="row" alignItems="center" gap="xs"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CAA | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Badge variant="secondary" size="s" content="Optional" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Layout.Stack> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}>@</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Table.Cell {root}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<InteractiveText variant="copy" isVisible text={`0 issue "certainly.com"`} /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Cell> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Row.Base> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider making the CAA record value configurable. Similar to the comment in cnameTable.svelte, the CAA record value should be configurable rather than hardcoded. Consider using a configuration variable: <Table.Cell {root}>
- <InteractiveText variant="copy" isVisible text={`0 issue "certainly.com"`} />
+ <InteractiveText variant="copy" isVisible text={$regionalConsoleVariables._APP_DOMAIN_CAA_RECORD || `0 issue "certainly.com"`} />
</Table.Cell> 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Table.Root> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Layout.Stack gap="s" direction="row" alignItems="center"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{#if variant === 'cname'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{#if variant === 'cname' && !isSubDomain} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Alert.Inline> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If your domain uses CAA records, ensure certainly.com is authorized — otherwise, SSL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
setup may fail. A list of all domain providers and their DNS setting is available <Link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
variant="muted" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
external | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
href="https://appwrite.io/docs/advanced/platform/custom-domains">here</Link | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain, CNAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
record is only supported by certain providers. If yours doesn't, please verify using | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Link variant="muted" on:click={onNavigateToNameservers}>nameservers</Link> instead. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</Alert.Inline> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{:else} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<Typography.Text variant="m-400" color="--fgcolor-neutral-secondary"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hide if we dont have caa in env var