Bungie-net / api

Resources for the Bungie.net API
Other
1.21k stars 92 forks source link

PGCR endpoint domain redirect #853

Open Achronos-BNG opened 5 years ago

Achronos-BNG commented 5 years ago

Quick heads up: Starting in our late January release (tenatively scheduled for the 22nd), we will begin forcing all calls to made to Destiny2/Stats/PostGameCarnageReport on the domain www.bungie.net to a permanent redirect to an identical GET request on the endpoint stats.bungie.net. We added stats.bungie.net as a domain alias a while ago for anonymous stats scrapers to call the PostGameCarnageReport endpoint and "suggested" that you start using it instead, most of you do, thanks for that. But we are now going to enforce it to improve load balancing and performance for this type of request. If you did not heed our advice a few months ago, there is a possibility that your clients will break or suffer degraded performance if you continue to use www.bungie.net to access the PostGameCarnageReport API.

ChaseMalik commented 5 years ago

It appears as though you have redirected all calls to https://www.bungie.net/.../PostGameCarnageReport/... to point to http://stats.bungie.net, so calls are failing in browsers in https sites due to mixed-content. Is there a reason the 301 isn't pointing to https since the http://stats.bungie.net call then just redirects to https://stats.bungie.net?

Achronos-BNG commented 5 years ago

Looks like there is a bug with detecting the scheme happening because our production web servers are behind a load balancer that is handling the https. This particular bug is probably a low priority fix, though, considering that you should not be relying on the redirect in your apps at all, and just call https://stats.bungie.net directly when calling the PGCR endpoint. The redirect only exists to stop those apps who are violating the instructions to use stats.bungie.net from causing affinity-related perf issues on our servers.

SarKurd commented 5 years ago

Today i noticed i had 301 issue with my app which i added PGCR weeks ago so my app was broken the whole time? :'(

delphiactual commented 5 years ago

Since the redirect went live on the 29th

SarKurd commented 5 years ago

Since the redirect went live on the 29th

I thought it went live on 22nd, that's a relief