mavlink / mavlink-camera-manager

MAVLink Camera Manager Service
MIT License
84 stars 25 forks source link

API Call CORS-blocked #408

Closed maphstr closed 2 weeks ago

maphstr commented 3 weeks ago

When trying to use some of the API-methods:

Access to XMLHttpRequest at 'http://192.168.40.169:6020/streams' from origin 'http://192.168.40.169:8333' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Williangalvani commented 3 weeks ago

Hi! try accessing it through /mavlink-camera-manager , then nginx should handle the CORS permissions

maphstr commented 3 weeks ago

Yes. That only works on blueOS though.

patrickelectric commented 3 weeks ago

That should be disabled/enabled by a= command line argument in MCM as well

Williangalvani commented 2 weeks ago

does it make sense at all to limit cors? since 99.9% of clients will be external, except when you do a reverse proxy as we do in blueos or are talking to it from a backend program

joaoantoniocardoso commented 2 weeks ago

@maphstr, can you try the #409? You can download the binary from here

maphstr commented 2 weeks ago

Thats what I thought as well Willian, #409 works 👍