Atlaslog / Field Notes / Services & tile access
Field note · Services & tile access
HTTPS page loads HTTP tiles and the browser blocks them
Quick answer
After the site moved to HTTPS the basemap requests tiles over http:// and Chrome blocks them as mixed content. Either the protocol is hardcoded in the frontend or only the main site has a certificate.
Symptom
- Console reports Mixed Content: the page at https://app.example.cn/map requested an insecure image http://tile.example.cn/12/3412/1420.png.
- The network panel shows tiles as blocked:mixed-content and the map area is only the background colour.
- Some browsers auto-upgrade instead, and the request then fails with an SSL error.
Checklist
- Filter the network panel by blocked:mixed-content to list every blocked URL.
- Grep code and configuration for hardcoded http:// strings.
- Test the tile host over HTTPS with curl -I and check whether the certificate is valid.
- Check whether the reverse proxy holds a certificate for the tile domain or only for the main site.
- Check for an existing Content-Security-Policy header before adding another.
Fix
Build the tile URL from location.protocol or use a same-origin path such as /tiles/{z}/{x}/{y}.png behind one HTTPS virtual host, so only one certificate is maintained. Once the tile host genuinely serves HTTPS, Content-Security-Policy upgrade-insecure-requests can rewrite the remaining legacy URLs.
Code
Mixed Content: The page at 'https://app.example.cn/map' was loaded over HTTPS,
but requested an insecure image 'http://tile.example.cn/12/3412/1420.png'.
This content should also be served over HTTPS.curl -I "https://tile.example.cn/12/3412/1420.png"
# 若返回 SSL 错误,说明该域名没有配置证书
Watch out
- Adding upgrade-insecure-requests while the tile host has no certificate: blocked becomes unreachable, which looks similar but has a different root cause.
- Blaming the map library, when the request is blocked before it ever leaves the browser.
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Atlaslog (2026). HTTPS page loads HTTP tiles and the browser blocks them. https://www.jingweizhi.com/en/cookbook/mixed-content-block.html (accessed 2026-11-03).