Iframes and Fancybox

0

I want to open an iframe from Google Maps on a Fancybox via fancybox.iframe . But it gives the following error:

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I know the explanation of something cross-domain and that ajax does not do this but is there any solution?

    
asked by anonymous 04.06.2014 / 21:39

1 answer

1

Put this in your .htaccess to free the external search for any site:

    <FilesMatch "\.(*)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
      </IfModule>
    </FilesMatch>

or just for maps:

    <FilesMatch "\.(*)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin: https://maps.google.com
      </IfModule>
    </FilesMatch>
    
04.06.2014 / 21:44