I am trying to enable CORS in a specific file (stellar.toml) located at mydomain.com/.well-known/stellar.toml
I added the below catch all and allow for testing in my .htaccess file on my litespeed/wordpress site:
Access-Control-Allow-Origin: *
If I test it using curl command, I do not see 'access-control-allow-origin: *'. However, if I rename the directory just by removing the dot from the directory name (from .well-known to well-known) and do curl, it works:
curl --head mydomain.com/well-known/stellar.toml
What is happening?
The .htaccess setting may not work because the CORS setting must be in the 'backend' if you use php, set the header in your index.php.
Headers in PHP instead of the .htaccess file: https://stackoverflow.com/a/14469443/7306365
Configuration on nginx / Apache Server: https://stackoverflow.com/a/41039506/7306365