MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    CORS Policy Issue - different at electron and remote Chrome Browser

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 626 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • spitzlbergerjS Offline
      spitzlbergerj Project Sponsor Module Developer
      last edited by

      Hi,
      I have recently integrated the module octomirror-module. This module accesses the API of octoprint, a controller for 3D printers, and displays the status of the same.

      But now no data is displayed on the mirror in the module.

      MagicMirrorOctomirrorModulefromMirror.jpg

      An analysis on the MagicMirror browser showed the following error

      Access to XMLHttpRequest at 'http://192.168.178.157:5000/api/files' 0.0.0.0/:1 from origin 'http://0.0.0.8080' has been blocked by CORS policy. The request client is not a secure context and the resource is in more -private address space 'private'.
      

      However, when I call MagicMirror remotely with the Chrome browser, the module data is displayed correctly.

      MagicMirrorOctomirrorModule.jpg

      I’m not a specialist, but it seems that the MagicMirror browser makes the difference here.

      Is there any way to fix this?

      Many greetings

      Sepp

      Regards
      Josef

      http://www.spitzlberger.de/smartmirror, https://github.com/spitzlbergerj/MMM-TeslaLogger, https://github.com/spitzlbergerj/CaravanPi, https://www.la-gondola-barocca.de

      karsten13K 1 Reply Last reply Reply Quote 0
      • karsten13K Offline
        karsten13 @spitzlbergerj
        last edited by

        @spitzlbergerj

        you can try the ip-address of the pi in config.js as address: instead of "0.0.0.0".

        spitzlbergerjS 1 Reply Last reply Reply Quote 1
        • spitzlbergerjS Offline
          spitzlbergerj Project Sponsor Module Developer @karsten13
          last edited by

          @karsten13 wow, thank you a lot. it works now. That was easy …

          Regards
          Josef

          http://www.spitzlberger.de/smartmirror, https://github.com/spitzlbergerj/MMM-TeslaLogger, https://github.com/spitzlbergerj/CaravanPi, https://www.la-gondola-barocca.de

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy