Load HTTP WMS over HTTPS (using a proxy)

7817
15
Jump to solution
12-04-2017 10:06 AM
Raul_Jimenez
Esri Contributor

I have a problem trying to load a third party WMS (this one) over HTTP inside a Web AppBuilder app using HTTPs with popups enabled (via this Web map).

I have added a proxy (using the resource proxy) to the config.json and it seems to work (at first) as you will see here:

Every call to "ovc.catastro.meh.es" es been redirected though the proxy but then when the popup is triggered:

And if I edit the HTML directly it works:

Anyone know how to fix this? I'm not sure if this is an issue related to Web AppBuilder or to the ArcGIS API for JavaScript // cc: Jianxia Song, Lemao Wu, Robert Scheitlin, GISP, odoe

Thanks in advance!

0 Kudos
15 Replies
alegarma_dev
New Contributor

Hi Raul,

I have been trying to change this part of code in the PopupManager.js file after configuring my proxy in my IIS but I still come out with the same error (does not show the information in the popup)

What I have realised that when I make my screen smaller It partially works and goes through the proxy:

alegarma_dev_1-1633527139710.pngalegarma_dev_2-1633527353700.png

but not when I am using whole screen and does not show the popup correctly:

alegarma_dev_4-1633527615631.pngalegarma_dev_5-1633527673532.png

 

I will be pleased if you can give me any clue about this. Thank you

 

 

 

0 Kudos
alegarma_dev
New Contributor

Hi,

I have found another possible solution (dangerous), that you can comment, modifying the featureInfoUrl value of the WMS layer in https://ago-assistant.esri.com/#  from http to https.

I'm not an expert on this. I do not understand why featureInfoUrl goes throw http when the map is drawed in https?  Now the popup works as I wished. 

Best Regards,

Alex

by Anonymous User
Not applicable

I also think in the WMSLayer, the popup’s iframe URL is created by appending values to the layer’s featureInfoUrl property. So maybe you can also fix it by altering the property after the layer has loaded.

Cheers!

0 Kudos
JunshanLiu
Occasional Contributor III

The httpProxy is used only if the request is sent by esri/request, but the URL in popup is not sent by esri request, so it does not go over the proxy.

So you'd better make your URL trusted by browser.

Raul_Jimenez
Esri Contributor

Thanks Junshan, /sorry I didn't see your message before, I should to check my notification settings on geonet ^_^'')

That's a good approach when the app is for internal use, but if they try to publish the app for the general public I guess that's not going to be enough, right?

I guess this is not using esri/request because it is been created through the webmap using the JS API and the createMap method, is that right? Could we fix it using the a proxy rule?

Thanks in advance! // cc: Bjorn Svensson Rene Rubalcava Justin Colville Jeremy Bartley

0 Kudos
EugeneStaten
New Contributor III

I have this same issue, except I am not using Web AppBuilder. 

I am loading a public, wms layer over https via the proxy.

Here is the link:https://community.esri.com/t5/arcgis-api-for-javascript/wmslayer-bypasses-proxy-when-using-getfeatur...

Can any let me know what I can do in the WMS layer to make it work the same as here?

0 Kudos