3.55Enabling Standard Request Headers

Created on Aug 17, 2026~2 min read

To improve the compatibility of network requests sent by the application through the HTTP client and avoid being blocked by WAF (Web Application Firewall), the framework provides a one-click configuration method for quickly and uniformly setting standard request headers:

cs
HttpRequestBuilder.Get("https://furion.net")    .UseStandardRequestHeaders();HttpRequestBuilder.Get("https://furion.net")    .UseStandardRequestHeaders(false);   // Disable standard request headers

In addition to enabling standard header configuration for a single request, you can also register it globally to enable it in HttpClient:

cs
// Enable for the default clientservices.AddHttpClient(string.Empty, client =>{    client.UseStandardRequestHeaders();});services.AddHttpRemote();

After enabling standard request headers, the request will automatically add the following headers:

  • Accept: application/json, text/plain;q=0.9, */*;q=0.8 (explicit media type priority to avoid being blocked by WAF)
  • Connection: enables persistent connections (Keep-Alive), reducing the overhead of establishing and closing TCP connections