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

Tiles URL starts with "https,http,http://..." #89

Closed
stevage opened this issue Dec 17, 2019 · 3 comments · Fixed by #90
Closed

Tiles URL starts with "https,http,http://..." #89

stevage opened this issue Dec 17, 2019 · 3 comments · Fixed by #90

Comments

@stevage
Copy link
Contributor

@stevage stevage commented Dec 17, 2019

I'm getting a weird issue with a server hosted on Glitch where the tileJSON contains this:

"tiles":["https,http,http://demo-tessera.glitch.me/lgas/{z}/{x}/{y}.pbf"

Obviously that's not a usable tile endpoint, so Mapbox-GL-JS chokes on it.

I'm mystified why this is happening or what to do about it.

Any ideas?

@stevage
Copy link
Contributor Author

@stevage stevage commented Dec 17, 2019

Ok, so the issue seems to be that for some reason Glitch is setting the x-forwarded-proto header to this:

https,http,http

Whereas Tessera is assuming it will always be a single protocol. Annoyingly it doesn't seem to be a standard so there's no way to say who's right.

stevage added a commit to stevage/tessera that referenced this issue Dec 18, 2019
stevage added a commit to stevage/tessera that referenced this issue Dec 18, 2019
@mojodna
Copy link
Owner

@mojodna mojodna commented Mar 17, 2020

If I had to guess, the convention is probably to make them comma-delimited and append to the list, à la https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Syntax

I merged this for now, but it may make sense to attempt to split the list and shift the first element off, since that's what's seen by a client.

@stevage
Copy link
Contributor Author

@stevage stevage commented Mar 17, 2020

Oh, thanks - that makes sense. Not something I know much about.

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

Successfully merging a pull request may close this issue.

2 participants