Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS problems... #17

Open
Snille opened this issue Jan 7, 2022 · 7 comments
Open

CORS problems... #17

Snille opened this issue Jan 7, 2022 · 7 comments

Comments

@Snille
Copy link
Contributor

Snille commented Jan 7, 2022

Hi there! Been using your module for years now. :)
However, now it's not working anymore, the picture from the cameras does not show (it shows a broken picture icon only).
It has to do with the "CORES" security rule in Electron (now activated).
Access to fetch at 'http://10.0.0.112:8080/motioneye/show/2' from origin 'http://0.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.
I'm not sure how to fix this... :)

@OberfragGER
Copy link

OberfragGER commented Jan 18, 2022

Yes. Here same problem with 2.18 too!
If you config you adresse in config.js with
address: "localhost',
Then its working. But i have to configure
address: 0.0.0.0, for MMM-Remote-Control.

@SdeGeata
Copy link

Ok, this sorta works... it fixed something i've been swearing at for two days. Now curl "http://localhost:8080/motioneye will show my camera feed - a camera feed that wasn't showing up at all before. Now the "autohide" of MotionEye doesn't work. Any idea how to fix that???

@SdeGeata
Copy link

Addendum: It works when sending the command from terminal, not from MMM-Remote. So again, the dilemma seems to be address: "localhost', if you want to use MotionEye, or address: "0.0.0.0', if you want to use MMM-Remote-Control. I hope this can be fixed soon.

@SdeGeata
Copy link

So has anyone found a work-around for this yet? I have been playing with the webcontrol_localhost and set that to false. It is my understanding that this allows any machine on your network to control MotionEye? It seems to have no effect.

I don't know why this needs to be such a pain, I am running Motion/MotionEye on the same Rpi as my Magic Mirror. They just can't seem to speak to each other.

@StefanTR96
Copy link

Have exactly the same problem ... any solutions until now?

@SdeGeata
Copy link

Hello @StefanTR96 !

I didn’t find a working solution to this, but i did find a work-around. I ended up installing MMM-WebView on the mirror, pointing it to an RTSP feed from my Home Assistant. That seems to do the trick for me. I have some Home Assistant automations that hide/show the module via some command line prompts.

@OberfragGER
Copy link

OberfragGER commented Jan 29, 2023

Hello @StefanTR96 !

I didn’t find a working solution to this, but i did find a work-around. I ended up installing MMM-WebView on the mirror, pointing it to an RTSP feed from my Home Assistant. That seems to do the trick for me. I have some Home Assistant automations that hide/show the module via some command line prompts.

For me...its working now.
port: 8080, address: '192.168.178.80', // address: '0.0.0.0', ipWhitelist: [], ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.178.1/120", "192.168.178.100/24"], language: 'de',

192.168.178.80 = IP of my MagicMirror
192.168.178.100 = my Proxmox-Server, it think its not needed
192.168.178.1 = my Fritzbox...maybe the range

[Adress ](address: '0.0.0.0) is uncommented so this line is not needed anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants