mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 13:19:09 +03:00
feat: use empty allow list for restrict all access (#22023)
This commit is contained in:
1 parent
a775e3ba69
commit
dba7399145
2 files changed
+3
-6
No files matched your search
+2
-2
@@ -18,8 +18,8 @@ const DisallowAllModal = ({ visible, onClose }: DisallowAllModalProps) => {
|
||||
if (!ref) return console.error('Project ref is required')
|
||||
await applyNetworkRestrictions({
|
||||
projectRef: ref,
|
||||
dbAllowedCidrs: ['127.0.0.1/32'],
|
||||
dbAllowedCidrsV6: ['::1/128'],
|
||||
dbAllowedCidrs: [],
|
||||
dbAllowedCidrsV6: [],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -112,10 +112,7 @@ const NetworkRestrictions = () => {
|
||||
const hasApplyError = restrictionStatus === 'stored'
|
||||
const isUninitialized = restrictedIps.length === 0 && restrictionStatus.length === 0
|
||||
const isAllowedAll = restrictedIps.includes('0.0.0.0/0') && restrictedIps.includes('::/0')
|
||||
const isDisallowedAll =
|
||||
restrictedIps.length === 2 &&
|
||||
restrictedIps.includes('127.0.0.1/32') &&
|
||||
restrictedIps.includes('::1/128')
|
||||
const isDisallowedAll = restrictedIps.length === 0
|
||||
|
||||
if (!hasAccessToRestrictions) return <></>
|
||||
|
||||
|
||||
Reference in new issue
Block a user