Closed michielbdejong closed 9 years ago
Yes, but from different hostnames: https://stamen-tiles-{s}.a.ssl.fastly.net
https://github.com/stamen/maps.stamen.com/blob/master/index.html#L443-L453 http://maps.stamen.com/#usage-ssl (if you'd rather not be an HTML parser)
@mojodna 1) Your last link is broken 2) you should provide both http and https with the same domain. Having different domains is EXTREMELY annoying, because one cannot use an url such as "//c.tile.stamen.com/etc/etc" to have it work over http when the page is http and https when the page is https 3) This should be better documented, i.e. one should not be supposed to incur into the issue and google for it, but this would become irrelevant if (2) was fixed.
Please reconsider and reopen.
@teo1978, @mojodna is away for a week. Not sure why that anchor link isn't working (it's getting intercepted and rewritten by the hash on the map at the top of the page), but the SSL documentation is at the very bottom of http://maps.stamen.com/
SSL
If you'd like to display these map tiles on a website that requires HTTPS, use our tile SSL endpoint by replacing http://tile.stamen.com with https://stamen-tiles.a.ssl.fastly.net. Multiple subdomains can be also be used: https://stamen-tiles-{S}.a.ssl.fastly.net. JavaScript can be loaded from https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js.
Stamen's map tiles are available as a free service, and my understanding is that maintaining custom-domain https through fast.ly (which provides our caching) is rather costly. We just had a similar discussion with the folks over at CartoDB, and they do the same thing for their free map tiles.
my understanding is that maintaining custom-domain https through fast.ly (which provides our caching) is rather costly
I see. Have you considered CloudFlare? I have no idea whether it can provide you the same kind of caching as fast.ly, but it does provide ssl for free. (not sure whether it has other kinds of limitations though)
@teo1978 good point, CloudFlare's free SSL is nice. The main draw of Fastly is that it's unabashedly Varnish under the hood, which allows us to do some fairly complex stuff w/r/t artificial responses, backends for partial paths, etc.
So, CloudFlare isn't a drop-in replacement, but it could work as an additional layer that provides SSL (under the free plan, even).
Actually, the simplest solution is probably to use //stamen-tiles-{s}.a.ssl.fastly.net/
for the protocol-less endpoint, since it supports both SSL and non-SSL connections (despite the name and lack of vanity).
@mojodna since the non SSL endpoint is
"http://{S}tile.stamen.com/"
then the protocol-less URL should be
"//stamen-tiles-{S}a.ssl.fastly.net/"
.
(the {S} placeholder does already include a trailing dot).
The url that you have in the front page right now suggest using
"//stamen-tiles-{S}.a.ssl.fastly.net"
which has an extra dot after the {S} placeholder.
Hmm. Yeah, I'd forgotten about that. ModestMaps, which the docs were originally written in mind for (hence the capitalized {S}
) doesn't include it.
It might be clearer to not use the substitution syntax and instead be more explicit about that being where a subdomain could be placed.
Could the JS file here (http://maps.stamen.com/js/tile.stamen.js) be modified to use the protocol agnostic URL? That would make implementation a bit smoother for mixed environments.
For any React-Leaflet user stumbling here, the definitive URL for toner-lite is :
https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png
Beware of the lowercase {s}.
Could the JS file here (http://maps.stamen.com/js/tile.stamen.js) be modified to use the protocol agnostic URL? That would make implementation a bit smoother for mixed environments.
This would be really helpful and would encourage use of the CDN link for the .js file rather than downloading it and changing the link.
That said, thanks for offering this free service!
In https://michielbdejong.com/2014/checked-into-mitosis- there is for instance this tile:
http://c.tile.stamen.com/toner-lite/16/35215/21503.png
When I try to open https://c.tile.stamen.com/toner-lite/16/35215/21503.png there is no appropriate certificate on there. Is there somewhere where this tile is available over https?