Push not working on https

Push Framework with Atmosphere
Post Reply
pibi_calderon
Posts: 2
Joined: 04 Aug 2015, 22:02

12 May 2017, 16:49

Hi,

I am just testing Primefaces push on your showcase, it is used to work when the page was using http only. Now that it is using https it doesn't work anymore, and javascript console shows this error

Code: Select all

Mixed Content: The page at 'https://www.primefaces.org/showcase/push/counter.xhtml' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://www.primefaces.org:8080/showcase/primepush/counter?X-Atmosphere-tracking-id...ransport=websocket&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true'. This request has been blocked; this endpoint must be available over WSS.
av @ push.js.xhtml:1
push.js.xhtml:1 Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
    at av (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:12625)
    at af (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:14751)
    at aa (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:6118)
    at AtmosphereRequest.execute (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:36292)
    at Object.a.subscribe (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:36919)
    at connect (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:45029)
    at c.init (https://www.primefaces.org/showcase/javax.faces.resource/push/push.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:44940)
    at new c (https://www.primefaces.org/showcase/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:5:437)
    at Object.createWidget (https://www.primefaces.org/showcase/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:5001)
    at Object.cw (https://www.primefaces.org/showcase/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.1-SNAPSHOT:1:4822)
I already have an application with websockes that just runs over http only, but now I have to make it run over https.
How can I establish a socket connection using WSS?

jcon321
Posts: 3
Joined: 17 Nov 2014, 21:16

06 Jun 2017, 14:07

using apache as your reverse proxy? try with the option "ProxyVia On"

pibi_calderon
Posts: 2
Joined: 04 Aug 2015, 22:02

06 Jun 2017, 17:13

I am just using tomcat... no apache at the front... where do I set the option "ProxyVia On"?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest