Do I need HTTPS to run Web AppBuilder deployed apps?

5798
5
Jump to solution
01-21-2015 03:10 PM
KenDoman
Occasional Contributor II

So, I've attempted to deploy my first custom application built on Web AppBuilder. When I go to my demo site at http://<mydemosite>/, it loads and redirects to https://<mydemosite>/. The problem is, my demo server isn't set up for secure services, and my browser says that the webpage is not available. Do I need SSL certificates to run these apps, or is there a setting somewhere that I can change to redirect back to http://<mydemosite>/?

0 Kudos
1 Solution

Accepted Solutions
KenDoman
Occasional Contributor II

Okay, I found the answer. If you set the portalUrl in the config.json file to an HTTPS arcgis portal, then it will change the protocol of your Web AppBuilder to HTTPS. By changing the portalUrl to HTTP, the app loaded fine.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Ken,

  No https is not a requirement. I am not sure why your deployed app would automatically redirecting to https. Is there any more information you can give me?

0 Kudos
KenDoman
Occasional Contributor II

After stepping through the code, I found the code that is switching the window.location.protocol to https://, but I'm not sure why. In the file jimu.js/shared/ConfigManager.js, there's a method called _processNotInPortalAppProtocol. It looks like it's comparing the organization's ArcGISOnline portal url to the current url. It then switches the window.location.protocol to https in line 436 if the portal url is secured, but the current url isn't.

I'm going to try to find the source of the portal url, and attempt to change it to http:// to test if that works.

0 Kudos
KenDoman
Occasional Contributor II

Okay, I found the answer. If you set the portalUrl in the config.json file to an HTTPS arcgis portal, then it will change the protocol of your Web AppBuilder to HTTPS. By changing the portalUrl to HTTP, the app loaded fine.

JanetKhuu
New Contributor

I'd like to add if editing config.json's portalUrl parameter doesn't work, nodejs's signininfo.json also has it. That file can be found in [webapp builder extracted folder]/server/signininfo.json.

KeithLam
New Contributor

Beside change the portalURL from https to http. Please also noted the port number. Portal run https on 7443 and run http on 7080.

0 Kudos