Bonjour,
J'utilise l'autoconf (https) généré (hier) à partir de : http://ignf.github.io/geoportal-acce...getconfig.html avec le plugin openlayers (https://geoservices.ign.fr/documenta...ension-ol.html https://github.com/IGNF/geoportal-ex...-openlayers.md).
Firefox 66 et Chrome/Chromium 73 refusent de charger autoconf.json avec respectivement les erreurs suivantes :
"La ressource à l’adresse « https://domain.tld/geoportail/autoco...lback=callback » a été bloquée en raison d’un type MIME (« application/json ») incorrect (X-Content-Type-Options: nosniff)"
"Refused to execute script from 'https://domain.tld/geoportail/autoconf-https.json?gp-access-lib=2.1.2&output=json&callback=callback' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled."
Différentes tentatives d'arrangement pour obtenir un fichier json valide ne donne rien.
Cela a été contourné en laissant le fichier tel que généré et en changeant l’extension du fichier vers .js autoconf.json -> autoconf.js
https://developer.mozilla.org/fr/doc...t-Type-Options
Url du script : https://ignf.github.io/geoportal-ext...nOpenLayers.js .
Openlayers 4.4.2 : https://cdn.jsdelivr.net/npm/openlay...dist/ol.min.js
Cordialement,
Eric
Partager