mikespub-org/seblucas-cops

Client Side Rendering vs cloudflare tunnel

Closed this issue · 2 comments

I have a cloudflare tunnel set up to my homelab, and https://cops.my.tld is set to tunnel to the IP of my docker container running cops.

https://cops.my.tld/checkconfig.php always works

if I have "cops_server_side_render" set to "." (i.e. it always does server-side rendering), then everything displays as expected..

However, if i leave cops_server_side_render as the default (checkconfig.php reports that it's gonna client-side render), then index.php just returns me an HTML document with nothing in the section.

If i paste the URL from the initiateAjax call (http://cops.my.tld/getJSON.php?page=index&complete=1) then I get the JSON i'd expect.

needless to say, all this works fine if i access using http://localhost - so i'm thinking it's getting lost in the tunnel somewhere.

Any ideas?

Ignore me. I'm a moron....

When I looked at the console in edge, i saw the answer

Mixed Content: The page at '<URL>' was loaded over HTTPS, 
but requested an insecure XMLHttpRequest endpoint '<URL>'. 
This request has been blocked; the content must be served over HTTPS

I had
cops_full_url = "http://cops.my.tld"
as soon as i corrected it to
cops_full_url = "https://cops.my.tld"
then all was good in the world

Thanks for the input - it's good to hear how different setups work out well (in the end) :-)