Don't rewrite Bing tile URLs to https, instead just ask for https #7861
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For ~5 years now, we've had code in
BingMapsImageryProvider
that rewrote the tile URL fromhttp://
tohttps://
if the page was on an https connection. This seemed kind of dodgy, but we thought it was necessary to avoid mixed content warnings.But, it turns out that Bing Maps (now?) has a way to directly ask for an https tile URL, by adding
&uriScheme=https
to the metadata URL. And it also turns out that this is totally necessary with the new "on demand" styles added in #7808 because, if we just rewrite the URL as we were doing before, we get invalid certificate errors. Bing Maps returns an akamai.net certificate when we're connecting on a virtualearth.net domain.So this PR switches to using the
uriScheme
mechanism. The new on-demand styles won't work on https pages without this PR (ask me how I know).