0

Problem with zEmbedded js API

asked 2022-09-13 23:27:00 +0800

andij62 gravatar image andij62
313 1 7

I have a problem with the zEmbedded js API. I embed the following code on the external page

    <script id="embeddedScript" src="https://xxx.de/aemajaxtest/zkau/web/js/zkmax/embedded/embedded.js"></script>
<div id="zkapp">Loading ZK ...</div>
<script>
   zEmbedded.load('zkapp', 'https://xxx.de/aemajaxtest/test1.zul')
       .then(function(result) { console.log('zkapp', result); })
       .catch(function(error) { console.error(error); });
</script>

On the external side I get the following error message e.g.

embedded.js:12 Mixed Content: The page at 'https://externsite/test.html' was loaded over HTTPS, but requested an insecure stylesheet 'http://xxx.de/aemajaxtest/zkau/web/1128a177/zul/css/zk.wcs;jsessionid=F0C8C5822FD72C110A92EEC8BFA964D2'. This request has been blocked; the content must be served over HTTPS.

What could be the problem? Thank you for your help

Thanks Andi

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-09-15 18:01:00 +0800

MDuchemin gravatar image MDuchemin
2298 1 5
ZK Team

Hi there,

It looks like the zk.wcs stylesheet is loaded through http instead of the expected https. Can you check if the other ZK resources (zk.wpd, etc.) are loading through https as expected?

Which ZK version are you running?

On possible thing to check, is if your ZK service is located behind a reverse proxy (or other network middleware, such as a load balancer, etc), with the public side using https and the internal side using http to the webserver, there could be some requesting issue, in which the server detects an http connection from the proxy to the webserver. In that case, if there is a "direct" access url for the webserver, a simple way to test if this is the issue would be to use the direct url instead of the proxy one.

link publish delete flag offensive edit

Comments

Thanks for the hint. That was the problem. After we put the ssl-termination from the load balancer to the tomcat, everything works as desired!

andij62 ( 2022-09-16 23:20:17 +0800 )edit

good to hear!

MDuchemin ( 2022-09-19 13:50:06 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2022-09-13 23:27:00 +0800

Seen: 10 times

Last updated: Sep 15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More