Esri javascript 4.8 request http

1169
8
07-12-2018 08:55 AM
JoguerTacas_Misaico1
New Contributor

esriRequest automatically changes the protocol from http to https, in version 4.7 that does not happen.

0 Kudos
8 Replies
AndriyGalayda
New Contributor II

I have same issue with WMSLayer . It changes automaticaly http with https. Is there any way to fix it?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

If you use a url like localhost or try and access your html file for the file system like file:/// then you will automatically get all urls redirected to https when using 4.8. This is actually intentional and if you need to access an http url you need to use you machine name in the url instead of localhost, 127.0.0.1 or file:

0 Kudos
AndriyGalayda
New Contributor II

Sorry, not sure what do you mean. I run my project on my local machine and my url in browser is localhost, but i try to get another server which is http://domain.com/service/wms . and issue is this url is changed with https://domain.com/service/wms 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Andriy,

  When the fact that you are using localhost in the url is exactly what I am saying the issue is when using 4.8. In the 4.8 API localhost is considered a secure source and the API will use https for all requests (this is a new change in the 4,8 API). If you need to use an http url for a layer then you HAVE to use your machine name in the url and NOT localhost.

AndriyGalayda
New Contributor II

Yes. It works with local IP. Thanks a lot Robert

0 Kudos
AndriyGalayda
New Contributor II

Hi

i faced same issue , but on working site, not on localhost. My site is working via https, and this issue is back. Url of WMS service is changed from htpp to https again. Is there any way to solve this issue?
Thank you

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sorry I have not run into that when using a production site.

0 Kudos
JohnGrayson
Esri Regular Contributor

Check out the 'Promote secured services' section of the 4.8 release notes:Release notes for 4.8 

0 Kudos