mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: regex for multi-region IPs (#16410)
* regex for multi-region IPs * Update index.tsx
This commit is contained in:
parent
c768941f2f
commit
a6aad52e38
@ -853,8 +853,9 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||
const { hostname } = window.location;
|
||||
let ipAlert = connectionAlert?.REGIONAL_IPS?.default || '';
|
||||
const regionalIPs = connectionAlert?.REGIONAL_IPS || {};
|
||||
Object.entries(regionalIPs).forEach(([regex, ipRange]) => {
|
||||
if (regex.match(hostname)) {
|
||||
Object.entries(regionalIPs).forEach(([ipRegion, ipRange]) => {
|
||||
const regex = new RegExp(ipRegion);
|
||||
if (hostname.match(regex)) {
|
||||
ipAlert = ipRange;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user