<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WAB Dev Edition proxy.js and WMS service with AddData Widget in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/wab-dev-edition-proxy-js-and-wms-service-with/m-p/1114610#M21550</link>
    <description>&lt;P&gt;I have the proxy information set up this way on a custom WAB site we host&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  "httpProxy": {
    "useProxy": true,
    "alwaysUseProxy": false,
    "url": "https://ourserver/proxy.ashx",
    "rules": []
  },&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 05 Nov 2021 18:54:28 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-11-05T18:54:28Z</dc:date>
    <item>
      <title>WAB Dev Edition proxy.js and WMS service with AddData Widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/wab-dev-edition-proxy-js-and-wms-service-with/m-p/1114148#M21536</link>
      <description>&lt;P&gt;I have a Web Appbuilder Developer Edition application running on my company’s server. We are running a reverse proxy and a strict content security policy but I do not think that is the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I am currently having is with adding a WMS service in the browser using the AddData Widget manual add url pane. I am using the example url provided in the widget, which is &lt;A href="https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?service=WMS&amp;amp;request=GetCapabilities" target="_blank"&gt;https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;. It is allowed through the content security policy.&lt;/P&gt;&lt;P&gt;The WAB application seems to require that the proxy.js be used to allow this url (which is an XML GetCapabilities file). I am able to do this successfully in my development environment, and the WMS map service comes into the map fine. However this is not working on the deployment company server.&lt;/P&gt;&lt;P&gt;For example purposes, the application itself is at this url: &lt;A href="https://mycompanyserver_url/myapp" target="_blank"&gt;https://mycompanyserver_url/myapp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have a rule set up in the config.json file which contains the above mesonet url and also points to the location of the proxy.js file, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"httpProxy": {
    "useProxy": true,
    "alwaysUseProxy": false,
    "url": "",
    "rules": [{
		"urlPrefix": "https://mesonet.agron.iastate.edu/",
		"proxyUrl": "https://mycompanyserver_url/myapp/proxy.js"
		}]
  },&lt;/LI-CODE&gt;&lt;P&gt;When I try to add the WMS url in the AddData tool, the application goes to&lt;/P&gt;&lt;P&gt;proxy?&lt;A href="https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?service=WMS&amp;amp;request=GetCapabilities" target="_blank"&gt;https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as expected, but it doesn’t find the XML because the proxy isn’t passing anything through.&lt;/P&gt;&lt;P&gt;Instead, it simply finds the proxy.js file. In other words, if I go here in a browser tab:&lt;/P&gt;&lt;P&gt;&lt;A href="%20https:/mycompanyserver_url/myapp/proxy.js" target="_blank"&gt;https://mycompanyserver_url/myapp/proxy.js&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;I simply hit the proxy.js file itself.&lt;/P&gt;&lt;P&gt;Can someone help me understand why proxy.js is not operating as a proxy and passing the url on to the application? Proxy.js is part of the application, which is allowed through the reverse proxy so I cannot understand why it is not functioning. It functions in my development setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 16:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/wab-dev-edition-proxy-js-and-wms-service-with/m-p/1114148#M21536</guid>
      <dc:creator>EMiller_2</dc:creator>
      <dc:date>2021-11-04T16:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: WAB Dev Edition proxy.js and WMS service with AddData Widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/wab-dev-edition-proxy-js-and-wms-service-with/m-p/1114610#M21550</link>
      <description>&lt;P&gt;I have the proxy information set up this way on a custom WAB site we host&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  "httpProxy": {
    "useProxy": true,
    "alwaysUseProxy": false,
    "url": "https://ourserver/proxy.ashx",
    "rules": []
  },&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Nov 2021 18:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/wab-dev-edition-proxy-js-and-wms-service-with/m-p/1114610#M21550</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-11-05T18:54:28Z</dc:date>
    </item>
  </channel>
</rss>

