0 Replies Latest reply on Jul 19, 2018 9:40 AM by somniac

    Web console behind reverse proxy gets proxied server's IP in JavaScript instead of proxy's domain

    somniac

      I am serving the Orion (SAM 6.6.1) web console through an IIS reverse proxy using URL rewrite. Mostly it works, but sometimes it still tries to use the proxied server's IP address.

       

      The most annoying example is that none of the popups work. Looking at the network log in my browser reveals that when popups should show, requests are made to the proxied server's IP address, which the browser can't access through the firewall. All these requests should be going through the proxy.

       

      It appears to me that the page loads the script at https://proxy.domain/ui/scripts/environment?43300.03.L which returns the following response:

      
      var SW;
      (function(sw) {
          sw.environment = {
              name: 'production',
              apiEndpoint: location.protocol + '//<proxied IP>/api2',
              legacyApiEndpoint: location.protocol + '//<proxied IP>/api',
              webServiceEndpoint: location.protocol + '//<proxied IP>/orion/services',
              contentApiEndpoint: location.protocol + '//<proxied IP>/ui/api',
              applicationPath: 'ui/',
              autoRefreshSeconds: 300,
              modules: ["add-node","apm","clm","dpa","ha","interfaces","licensing","manage","maps","nodemanagement","perfstack","recommendations","sam.adm","sam.adm.incoming.connections.resource","search","vim","vimcloud"],
              currentModule: '$empty',
              debugI18n: false,
              demoMode: false,
              webRevision: '43300.03.L',
              authTimeoutMilliseconds: 1500000,
              timezoneOffsetMinutes: 600,
              oipEnabled: false
          };
          sw.user = {"AccountID":"DOMAIN\\USERNAME","Expires":"\/Date(4102408800000)\/","AccountEnabled":true,"MenuName":"Default","HomePageViewID":1,"DefaultNetObjectID":"","DefaultNetObject":"not selected","SummaryViewID":1,"NodeDetailsViewID":-1,"AllowAdmin":true,"AllowNodeManagement":true,"AllowMapManagement":true,"AllowUnmanage":true,"AllowDisableAction":true,"AllowDisableAlert":true,"AllowDisableAllActions":true,"AllowCustomize":true,"AllowEventClear":true,"AllowReportManagement":true,"AllowAlertManagement":true,"LastLogin":"\/Date(1531960062597)\/","ReportFolder":"Default Folder","AlertCategory":"","LimitationID1":0,"LimitationID2":0,"LimitationID3":0,"ToolsetIntegration":true,"DisableSessionTimeout":false,"AccountType":4,"GroupInfo":"DOMAIN\\Group","GroupPriority":0,"AccountSid":"S-I-D","AllowViewCopCheck":false,"UserTabs":[{"TabID":1,"MenuBarID":"Default"},{"TabID":3,"MenuBarID":"APM_TabMenu"},{"TabID":4,"MenuBarID":"Databases_TabMenu"},{"TabID":2,"MenuBarID":"Virtualization_TabMenu"}],"UserSettings":null,"AllowedViews":null};
          sw.user.menuStyle = '';
          sw.license = null;
          sw.featureToggles = [{"name":"SwSearch","isEnabled":true},{"name":"SwAllAlertsWidget","isEnabled":true},{"name":"SwDashboard","isEnabled":true}];
      })(SW || (SW = {}));
      

       

      The instances of <proxied IP> should probably be replaced with the domain of the proxy, but I do not know where this can be changed.

       

      Can someone please help me with this?