title: How to fix "The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time" error
body: <p>I've already enabled CORS on the project in C# .net Core </p>
  
  <p>In <code>startup.cs</code> I've added lines</p>
  
  <pre><code>...
  services.AddCors();
  ...
  app.UseCors(builder =&gt; builder
      .AllowAnyOrigin()
      .AllowAnyMethod()
      .AllowAnyHeader()
      .AllowCredentials());
  </code></pre>
  
  <p>But when I try to use API in another <code>Blazor</code> project I see in logs in my API project on Host this error</p>
  
  <blockquote>
    <p>The CORS protocol does not allow specifying a wildcard (any) origin
    and credentials at the same time. Configure the policy by listing
    individual origins if credentials needs to be supported</p>
  </blockquote>
  
  <p>My code in <code>Blazor</code></p>
  
  <pre><code>using (HttpClient http = new HttpClient()) {
    http.DefaultRequestHeaders.Add("Authorization", "Token");
     var response = await http.GetStringAsync("https://example.com?prm=2");
     Console.WriteLine(response);
     dynamicContent = response;
  }
  </code></pre>
  
  <p>Before I enable Cors I see another error in the browser console</p>
  
  <p>What can I change for solving it?</p>