If you are using Apache2, add this to the .conf file And enable the headers module, then restart ApacheFrom a separate pi, we can then do a fetch in JavaScript to get JSON data from the Apache2 server that has CORS enabled.
Code:
Header set Access-Control-Allow-Origin "*"
Code:
a2enmod headers
Statistics: Posted by neilgl — Sun Nov 24, 2024 10:10 am