Filter any HTTP request URI?


I want to filter any HTTP request URI done through the HTTP API.

Use cases:

  1. The WordPress update check goes to, but works too, and I want to use this always.
  2. The new WordPress file is taken from, but works too.
  3. Sometimes I want to debug requests and redirect those temporary to a custom domain on my local server.
  4. Some plugins make requests to other servers, and I want to replace these requests when the external server goes down.

The update requests are the most important ones for now, because there is still the unfixed bug 16778 (more information), and HTTPS requests lower the risk of a Man-in-the-middle attack.

I have searched thoroughly, I have studied the core code … but ended up like Nacin two years ago:

I thought for sure you could filter the URL of an HTTP request, but now I can’t find one.

What did I miss? Did I? 🙂

, , , , fuxia 3 years 2020-07-06T06:10:51-05:00 0 Answers 69 views 0

Leave an answer