Warning when downloading files - Mixed content https & http

Forum to discuss the Web client version of Servoy.

Warning when downloading files - Mixed content https & http

Postby pbdavis » Wed May 01, 2019 9:54 pm

Using Servoy 8.1.2.
When trying to download files from my Servoy application, Chrome initially blocks the download with a warning:
This page is trying to load scripts from unauthenticated sources.

Using the Chrome Developer tools, the console reports:
Code: Select all
servoy.js?w:lm=1486385934:1637
Mixed Content: The page at 'https://xyz.com/servoy-webclient/?x=HB8ByVXFPW1elzpQWRDr4A'
was loaded over HTTPS, but requested an insecure resource 'http://xyz.com/servoy-webclient/resources/servoy/resources'.
This request has been blocked; the content must be served over HTTPS.

Then examine the source code:
Code: Select all
function showurl(url, timeout, onRootFrame, useIFrame, pageExpiredRedirect)
{
var mywindow = window;
if (onRootFrame || useIFrame) {
mywindow = getRootServoyFrame();
}
if (useIFrame) {
var ifrm = document.getElementById('srv_downloadframe');
if (ifrm) {
ifrm.src = url;
} else {
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("src", url);
ifrm.setAttribute('id', 'srv_downloadframe');
ifrm.setAttribute('name', 'srv_downloadframe');
ifrm.style.width = 0 + "px";
ifrm.style.height = 0 + "px";
mywindow.document.body.appendChild(ifrm);

The last line is the offending line. Which means nothing to me. I think this is Servoy generated code.
url argument passed is HTTP instead of HTTPS. That is, 'http://xyz.com/servoy-webclient/resources/servoy/resources'

Anybody have any ideas on how to fix this warning, so that all the content is over HTTPS?

Thanks,
~Paul
Paul Davis
Belcan Engineering Group, LLC
pbdavis
 
Posts: 60
Joined: Thu Nov 30, 2017 5:40 pm
Location: Florida, USA

Re: Warning when downloading files - Mixed content https & h

Postby jdbruijn » Mon May 06, 2019 9:16 am

Hi Paul,

Do you have a proxy server before your Servoy server? We had something similar happen and it turned out to be an issue with the proxy server. I don't know what the problem was exactly or what was done to fix it, but maybe it gives you a search direction.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Warning when downloading files - Mixed content https & h

Postby pbdavis » Mon May 06, 2019 6:28 pm

Yes, there is a proxy between the users and the Servoy server. Ok, maybe an IT issue.
Thanks,
Paul Davis
Belcan Engineering Group, LLC
pbdavis
 
Posts: 60
Joined: Thu Nov 30, 2017 5:40 pm
Location: Florida, USA


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 7 guests