Íá ãÔßáÉ Access-Control-Allow-Origin not working
Íá ãÔßáÉ cpanel header('Access-Control-Allow-Origin: *');
How to enable CORS in your hosting account?



If you are a developer and need CORS enabled to run your app you can enable it adding the following lines in the .htaccess file in your hosting account.

ÇÝÊÍ ãáÝ .htaccess æÖÚ ÈÏÇÎáå åÐÇ ÇáÓØÑ æåÊÌÏ Çäå íÚãá ÈÔßá Óáíã

ßæÏ:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>

Other option is also enable the headers in your script if you are using PHP, for example:

ßæÏ:
<?php
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");
header('content-type: application/json; charset=utf-8'); ?>

ÇáãÑÌÚ:
https://secure.plusplushosting.net/k...g-account.html
https://forums.cpanel.net/threads/ac...orking.664637/