diff --git a/studio/components/interfaces/Database/index.ts b/studio/components/interfaces/Database/index.ts index d866b7d8c8c..94c664c2854 100644 --- a/studio/components/interfaces/Database/index.ts +++ b/studio/components/interfaces/Database/index.ts @@ -15,7 +15,7 @@ import PublicationsTables from './Publications/PublicationsTables' import BackupsList from './Backups/BackupsList' -import ConnectionPooling from './Pooling/ConnectionPooling' +import ConnectionPooling from '../Settings/Database/ConnectionPooling' import CreateTrigger from './Triggers/CreateTrigger' import DeleteTrigger from './Triggers/DeleteTrigger' diff --git a/studio/components/interfaces/Database/Pooling/ConnectionPooling.tsx b/studio/components/interfaces/Settings/Database/ConnectionPooling.tsx similarity index 100% rename from studio/components/interfaces/Database/Pooling/ConnectionPooling.tsx rename to studio/components/interfaces/Settings/Database/ConnectionPooling.tsx diff --git a/studio/components/interfaces/Settings/General/NetworkRestrictions/AddRestrictionModal.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx similarity index 88% rename from studio/components/interfaces/Settings/General/NetworkRestrictions/AddRestrictionModal.tsx rename to studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx index 6b93314d01a..94ecb1fabf4 100644 --- a/studio/components/interfaces/Settings/General/NetworkRestrictions/AddRestrictionModal.tsx +++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx @@ -4,6 +4,7 @@ import { Alert, Button, Form, Input, Modal } from 'ui' import { useStore, useParams } from 'hooks' import { useNetworkRestrictionsApplyMutation } from 'data/network-restrictions/network-retrictions-apply-mutation' +import InformationBox from 'components/ui/InformationBox' interface Props { restrictedIps: string[] @@ -77,7 +78,7 @@ const AddRestrictionModal: FC = ({ = ({ validate={validate} onSubmit={onSubmit} > - {({ isSubmitting }: any) => { + {({ isSubmitting }: { isSubmitting: boolean }) => { return ( <> @@ -99,6 +100,12 @@ const AddRestrictionModal: FC = ({ This will add an IP address range to a list of allowed ranges that can access your project's database.

+ = ({ visible, onClose }) => { = ({ visible, onClose }) => { This will prevent any IP address other than your local machine from accessing your project's database. Are you sure?

+
diff --git a/studio/components/interfaces/Settings/General/NetworkRestrictions/NetworkRestrictions.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx similarity index 94% rename from studio/components/interfaces/Settings/General/NetworkRestrictions/NetworkRestrictions.tsx rename to studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx index bd6f745867a..2e074e77c5c 100644 --- a/studio/components/interfaces/Settings/General/NetworkRestrictions/NetworkRestrictions.tsx +++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx @@ -116,8 +116,9 @@ const NetworkRestrictions = ({}) => { accessed externally

- Only your local machine is able to access your project's database as all IP - addresses have been disallowed. + Only IP addresses within the range of{' '} + 127.0.0.1/32 can access your project's + database as all IP addresses have been disallowed.

@@ -138,6 +139,10 @@ const NetworkRestrictions = ({}) => { You may remove all of them to allow all IP addresses to have access to your database

+

+ Note: Restrictions only apply to your database, and not to APIs offered over + HTTPS +