Raccolta: 429 del CDN come rallentamento, attese crescenti e recupero dei falliti, storico e seguiti senza pagina di ripresa, lacuna sotto la prima pagina, eliminazioni durante lo scaricamento (regole-3, cdn-429, dl-1, post-loop, walk-1, check-1, scroll-1, reader-1, h9-1, ring-1, library-2, dedup-1, tmp-1, budget-1, regole-4, kind-1, vocab-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
28 files changed
+2619
-200
No files matched your search
@@ -307,6 +307,15 @@ public sealed class TestSite : IAsyncDisposable
|
||||
private async Task ServeCdnAsync(HttpContext context)
|
||||
{
|
||||
var path = context.Request.Path.Value ?? string.Empty;
|
||||
if (Control.CdnTooManyRequests)
|
||||
{
|
||||
Control.OnCdnThrottled();
|
||||
context.Response.StatusCode = 429;
|
||||
context.Response.ContentType = "text/plain; charset=utf-8";
|
||||
await context.Response.WriteAsync("Troppe richieste.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
var query = context.Request.Query;
|
||||
var check = Signer.Check(path, query["scad"].ToString(), query["firma"].ToString(), _time.GetUtcNow());
|
||||
if (check != CdnCheck.Valid)
|
||||
@@ -368,6 +377,9 @@ public sealed class TestSite : IAsyncDisposable
|
||||
case "durata-storie":
|
||||
Control.StoryDuration = TimeSpan.FromMilliseconds(int.Parse(q["ms"].ToString(), CultureInfo.InvariantCulture));
|
||||
break;
|
||||
case "cdn-troppe-richieste":
|
||||
Control.CdnTooManyRequests = q["valore"].ToString() is "si" or "sì" or "true";
|
||||
break;
|
||||
case "scadenza-indirizzi":
|
||||
Control.AddressLifetime = TimeSpan.FromSeconds(int.Parse(q["secondi"].ToString(), CultureInfo.InvariantCulture));
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user