I have a map that is connected to a wms service of the cadastre, the problem I have is that when I click on it and retrieve the information I receive this error:
Access to XMLHttpRequest at 'http://wms.mapama.es/wms/wms.aspx? 9834.10142031471% 2C4851188.2670040075% 2C-8242.061440562522% 2C4851880.977572841 & query_layers = sigpac & X = 682 & Y = 174 ‘from origin’ http://lockesoft.ovh ‘has been blocked by CORS policy: No’ Access-Control-Allow-Origin header ’ present on the requested resource.
I’ve searched the forum for information and found an answer saying I should add this to a .htaccess file:
Header set Access-Control-Allow-Origin “*”
I have created this file with just this line and keep getting the same error.
I leave a link to the file in case it is required:
I have a VPS with Virtualmin on Debian 8.