You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/23 21:46:48 UTC

[GitHub] [superset] eschutho commented on a change in pull request #16410: fix: regex for multi-region IPs

eschutho commented on a change in pull request #16410:
URL: https://github.com/apache/superset/pull/16410#discussion_r694331404



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -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);

Review comment:
       you used to have the case insensitive flag on this? Do you want to bring it back in? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org