Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix incorrectly hiding SSL cert

Joshen Limf8700ff5c62c
diff --git a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
index d1709896cf1..c276e186320 100644
--- a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
+++ b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
@@ -62,13 +62,11 @@ const SSLConfiguration = () => {
}
}
- if (!hasAccessToSSLEnforcement) return <></>
-
return (
<div>
<div className="flex items-center justify-between">
<FormHeader title="SSL Configuration" description="" />
- <div className="flex items-center space-x-2 mb-6">
+ {/* <div className="flex items-center space-x-2 mb-6">
<Link href="https://supabase.com/docs/guides/platform/ssl-enforcement">
<a target="_blank">
<Button type="default" icon={<IconExternalLink />}>
@@ -76,53 +74,55 @@ const SSLConfiguration = () => {
</Button>
</a>
</Link>
- </div>
+ </div> */}
</div>
<FormPanel>
- <FormSection
- header={
- <FormSectionLabel
- className="lg:col-span-7"
- description={
- <div className="space-y-4">
- <p className="text-sm text-scale-1000">
- Reject non-SSL connections to your database
- </p>
- {!sslEnforcementConfiguration?.appliedSuccessfully && (
- <Alert
- withIcon
- variant="warning"
- title="SSL enforcement was not updated successfully"
- >
- Please try updating again, or contact{' '}
- <Link href="/support/new">
- <a target="_blank" className="underline">
- support
- </a>
- </Link>{' '}
- if this error persists
- </Alert>
- )}
- </div>
- }
- >
- Enforce SSL on incoming connections
- </FormSectionLabel>
- }
- >
- <FormSectionContent loading={false} className="lg:!col-span-5">
- <div className="flex items-center justify-end mt-2.5 space-x-2">
- {(isLoading || isSubmitting) && (
- <IconLoader className="animate-spin" strokeWidth={1.5} size={16} />
- )}
- <Toggle
- checked={isEnforced}
- disabled={isLoading || isSubmitting}
- onChange={toggleSSLEnforcement}
- />
- </div>
- </FormSectionContent>
- </FormSection>
+ {hasAccessToSSLEnforcement && (
+ <FormSection
+ header={
+ <FormSectionLabel
+ className="lg:col-span-7"
+ description={
+ <div className="space-y-4">
+ <p className="text-sm text-scale-1000">
+ Reject non-SSL connections to your database
+ </p>
+ {!sslEnforcementConfiguration?.appliedSuccessfully && (
+ <Alert
+ withIcon
+ variant="warning"
+ title="SSL enforcement was not updated successfully"
+ >
+ Please try updating again, or contact{' '}
+ <Link href="/support/new">
+ <a target="_blank" className="underline">
+ support
+ </a>
+ </Link>{' '}
+ if this error persists
+ </Alert>
+ )}
+ </div>
+ }
+ >
+ Enforce SSL on incoming connections
+ </FormSectionLabel>
+ }
+ >
+ <FormSectionContent loading={false} className="lg:!col-span-5">
+ <div className="flex items-center justify-end mt-2.5 space-x-2">
+ {(isLoading || isSubmitting) && (
+ <IconLoader className="animate-spin" strokeWidth={1.5} size={16} />
+ )}
+ <Toggle
+ checked={isEnforced}
+ disabled={isLoading || isSubmitting}
+ onChange={toggleSSLEnforcement}
+ />
+ </div>
+ </FormSectionContent>
+ </FormSection>
+ )}
<div className="grid grid-cols-1 items-center lg:grid-cols-2 p-8">
<div className="space-y-2">