Maxmind R2 presigned URLs

Just got an email from Maxmind:

As of Wednesday, May 1, 2024, we will use R2 presigned URLs for all database downloads in order to increase the security and reliability of our services.

Does anyone know whether this affects Discourse’s Maxmind usage?

9 Likes

Good point!

Based on this article

It would seem that a direct link (what Discourse uses) will be fine as it is. This means it will be
automatically redirected to their new URLs. So far, so good.

However, from what I see in the code, it doesn’t follow redirection: This will likely fail.
You would need to update the URL or allow redirection to fix this.

9 Likes

It does.

4 Likes

I wonder whether they recently started using redirects before implementing the presigned URLs.

1 Like

I just know that changing the code to allow redirects makes it work.

2 Likes

I was about to start looking to see whether there were any tests that would fail with that change, and you beat me to it! :smiling_face:

3 Likes

Well, it was a single word, and I’d already been hacking at the code on a live site, so it wasn’t that hard. Looks like all of the automated tests passed. . .

3 Likes

Oh, I’d been thinking that I would have to remember how to run all the tests locally, and I’ve reinstalled since the last time I did that so I was pretty sure that would be a rabbit hole of finding and installing dependencies… Just let the automation take care of it is smart. :smiling_face:

2 Likes