Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are tiles also available over https? #67

Closed
michielbdejong opened this issue Mar 13, 2015 · 10 comments
Closed

Are tiles also available over https? #67

michielbdejong opened this issue Mar 13, 2015 · 10 comments

Comments

@michielbdejong
Copy link

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?

@mojodna
Copy link
Collaborator

mojodna commented Mar 13, 2015

@mojodna mojodna closed this as completed Mar 13, 2015
@teo1978
Copy link

teo1978 commented Mar 29, 2015

@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.

@danrademacher
Copy link

@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.

@teo1978
Copy link

teo1978 commented Mar 29, 2015

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)

@mojodna
Copy link
Collaborator

mojodna commented Apr 6, 2015

@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 added a commit that referenced this issue Apr 6, 2015
@ffflabs
Copy link

ffflabs commented Dec 10, 2015

@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.

@mojodna
Copy link
Collaborator

mojodna commented Dec 11, 2015

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.

@dominic-p
Copy link

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.

@Bigood
Copy link

Bigood commented Jun 5, 2019

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}.

@dwasyl
Copy link

dwasyl commented Mar 27, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants