Leaflet does not work. When I select a Leaflet view, the map is not displayed.

Comments

zenimagine created an issue. See original summary.

christianadamski’s picture

Status: Active » Postponed (maintainer needs more info)

I can see the window, the marker and the controls in your screenshot. So leaflet works. It seems like the tiles didn't load. Any console errors?

zenimagine’s picture

StatusFileSize
new203.81 KB

Here is the error message in the console :

because it violates the following Content Security Policy directive: "default-src https: data: 'unsafe-inline' 'unsafe-eval'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.

zenimagine’s picture

Here is the configuration of my server :

    Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set X-Download-Options "noopen"
    Header always set X-Permitted-Cross-Domain-Policies "none"
    Header always set Content-Security-Policy "default-src https: data: 'unsafe-inline' 'unsafe-eval'"
    Header set Set-Cookie HttpOnly;Secure
zenimagine’s picture

Status: Postponed (maintainer needs more info) » Active
zenimagine’s picture

zenimagine’s picture

Title: Leaflet does not work » OSM does not work in HTTPS
zenimagine’s picture

Title: OSM does not work in HTTPS » OSM does not work in HTTPS (header CSP)
christianadamski’s picture

Status: Active » Fixed

Tiles will now be loaded via https connection from SSL-secured tileserver.

  • ChristianAdamski committed 170c9ea on 8.x-2.x
    Issue #2936510 by zenimagine, ChristianAdamski: OSM does not work in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

parijke’s picture

Component: Geolocation field » Geolocation Field / Backend

This commit is not in 8.x-2.0-beta1 but only in dev? I have the same issue.