dlh_googlemaps
dlh_googlemaps copied to clipboard
CORS error
Ho!
wir bekamen folgenden Fehler in der Konsole:
Access to script at 'https://maps.googleapis.com/maps/api/js?key=CODE&language=de' from origin 'https://www.seipp.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
Der Grund war, dass das Script mit https:// geladen wird, folgender Fix hat den Fehler behoben:
templates/ce_dlh_googlemaps_default.html5
- Statt https://maps.googleapis.com wird nur //maps.googleapis.com genutzt
<?php
if($_COOKIE['dlh_googlemaps'] || $this->map['protected']!='1'):
$GLOBALS['TL_JAVASCRIPT'][] = '//maps.googleapis.com/maps/api/js?key=' . $this->map['key'] . '&language=' . $this->map['language'];
$this->map['privacy'] == '';
endif;
?>
Danke für das Modul, funktioniert bei uns auch in 4.7 perfekt.