iframe v2 firmware

Discussion in 'C-Bus Automation Controllers' started by Ks04, Dec 15, 2024.

  1. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    115
    Likes Received:
    10
    Hey,

    Has anyone found a solution to supporting frames and cameras in version 2.0 firmware? Since updating these pages simply show "This content is blocked. Contact the site owner to fix the issue." which has broken quite a bit for me!
     
    Ks04, Dec 15, 2024
    #1
    anarool likes this.
  2. Ks04

    Diggerz

    Joined:
    Jan 24, 2017
    Messages:
    61
    Likes Received:
    9
    Location:
    Australia, Vic, Melbourne
    Just did a test and i get the same, reading the logicmachine forums one suggestion was to enable "Allow external resources (JS/CSS)" in Utilities > Vis. configuration. It worked for some, but not in my case. 1.18.0 firmare displays fine.
    Could be that my camera streams are http and not https?

    As a test using an iframe with 'https://nodejs.org/en' works after allowing external resources.
     
    Last edited: Dec 16, 2024
    Diggerz, Dec 16, 2024
    #2
  3. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    115
    Likes Received:
    10
    Yeah I've found the same thing - https pages work fine, but http pages do not. This is pretty short sighted in a home automation environment where many devices do not support HTTPS due to the overheads, and is really not required within a local network environment.

    At minimum, this should be a configurable option.
     
    Ks04, Dec 20, 2024
    #3
  4. Ks04

    SgrAystar

    Joined:
    Oct 4, 2018
    Messages:
    64
    Likes Received:
    5
    Location:
    Melbourne, Australia
    I haven't upgraded yet. What is not working, just the camera login? Or everything non https?

    At present I am using an iframe to show cameras via Blue Iris http web server.
     
    SgrAystar, Dec 29, 2024
    #4
  5. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    115
    Likes Received:
    10
    Any iframes which arent https presents an error for me
     
    Ks04, Jan 1, 2025
    #5
  6. Ks04

    Ks04

    Joined:
    Dec 28, 2019
    Messages:
    115
    Likes Received:
    10
    interestingly, enabling these features under vis. configuration now allows me to access https urls
    upload_2025-1-6_11-15-26.png
     
    Ks04, Jan 6, 2025
    #6
  7. Ks04

    SgrAystar

    Joined:
    Oct 4, 2018
    Messages:
    64
    Likes Received:
    5
    Location:
    Melbourne, Australia
    This issue prompted me to to try out a reverse proxy as a way of dealing with mixed content on the lan. In theory the iframe links can then be changed to https for the http sources.
    So far this is working for a basic setup, not yet upgraded the controller to v2 to try that.

    I already had a public domain with No-IP that includes an SSL certificate.
    The ddns is used for vpn only, ports 80/443 are not are open/forwarded to the lan.
    A lan DNS record points extserver.mynetgear.com to the reverse proxy server, which has loaded the certifcates for extserver.mynetgear.com so there are no certificate warnings from the browser.
    Now https://extserver.mynetgear.com/server1/stuff is proxied to http://server1.internal/stuff and http content is visible.

    Example NGINX config to access the controller visualisation, and default to the blue iris web server:
    Code:
        # HTTPS reverse proxy
        #
        server {
            listen 80;
            listen [::]:80;
            listen 443 ssl;
            listen [::]:443 ssl;
            server_name extserver.mynetgear.com;
    
            # When receiving an HTTP connection on this port, redirect to HTTPS
            error_page 497 https://$host:$server_port$request_uri;
    
            ssl_certificate "\cert\extserver_mynetgear_com.pem";
            ssl_certificate_key "\cert\extserver_mynetgear_com.key";
            ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1 TLSv1;
            ssl_ciphers  HIGH:!aNULL:!MD5;
            ssl_prefer_server_ciphers  on;
    
            location /scada {
                proxy_pass http://ac2.internal;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
            }
    
            location / {
              proxy_pass http://touchpc.internal:81/;
              proxy_http_version 1.1;
              proxy_buffering off;  # Prevents low-bandwidth streams from stuttering
              tcp_nodelay on;       # Helps keep delay at a minimum when streaming
              proxy_set_header X-Forwarded-For $remote_addr;
            }
        }
    
     
    SgrAystar, Jan 11, 2025
    #7
  8. Ks04

    Diggerz

    Joined:
    Jan 24, 2017
    Messages:
    61
    Likes Received:
    9
    Location:
    Australia, Vic, Melbourne
    After logging into the camera / NVR and enabling https, and Enabling "Allow external resources (JS/CSS)" on the AC2 in Utilities > Vis. configuration i can view the https camera urls in the iframe.

    using http sources in the iframe creates a mixed content error

    I'll have to update the cam proxy i had running on a pi to https. The only reason for the proxy on the pi is to get around the user having to fill in the login credentials to view the camera feeds, the proxy handles the auth with the nvr upon a request and then sends the mjpeg stream.
     
    Diggerz, Jan 12, 2025
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.