Conversation
|
I'm not sure if |
|
The community switcher also pulls a list of communities from somewhere, presumably here (but I haven't checked). |
|
I can't say I know off the top of my head everywhere this is used, but seems sensible to restore it to working order until we can review properly whether it's still required. |
|
Let's get this reviewed by someone more competent than I am. :-) How do we test it? |
| else | ||
| response = Net::HTTP.get_response(URI('https://codidact.com/communities.json')) | ||
| uri = URI('https://codidact.com/communities.json') | ||
| req = Net::HTTP::Get.new(uri) |
There was a problem hiding this comment.
Let's maybe take the opportunity and untie development from codidact being up by making this configurable and not hardcoded? Also makes sense if we ever switch domains or restructure. If I am able to get some time off for that, I can push here or barring that - separately.
In mitigating for the incident over the weekend, I made the server simply ignore if it couldn't fetch other Codidact sites and move on. This has left us without a functioning communities list in the footer. This change adds an authorization header that Cloudflare should recognise and allow the request.