• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 609 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.
  • S Offline
    spitzlbergerj Project Sponsor Module Developer
    last edited by Apr 14, 2022, 8:32 AM

    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

    K 1 Reply Last reply Apr 14, 2022, 7:14 PM Reply Quote 0
    • K Offline
      karsten13 @spitzlbergerj
      last edited by Apr 14, 2022, 7:14 PM

      @spitzlbergerj

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

      S 1 Reply Last reply Apr 15, 2022, 7:45 AM Reply Quote 1
      • S Offline
        spitzlbergerj Project Sponsor Module Developer @karsten13
        last edited by Apr 15, 2022, 7:45 AM

        @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
        1 / 1
        • First post
          1/3
          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