Tai If you want to allow access to Flarum from all sources, you can use the following addition to the Flarum .htaccess:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
Please be aware this opens up the API to everyone. Security is not optimal yet.