You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Rate limiting is added to some endpoints only, as it will keep the program stable.
30
-
// The endpoints without rate limiting, such as ping, are endpoints we don't expect to break anything from a large amount of requests, and rate limiting would only be to prevent ddos attacks.
31
-
// If we add rate limiting to these endpoints, we need to add another policy that allows a higher request rate than the one used for files.
32
-
// Metadata already has an internal queue for writing updates, which means rate limiting isn't required.
33
-
// TODO: metadata queue only applies when writing to the file, not reading from. This hasn't been an issue so far, but maybe rate limiting on metadata read requests could be useful.
34
19
varratePolicy="fixed";
35
20
36
21
var_hostEnvironment=app.Environment;
37
22
#region connection
38
23
// To maintain connection
39
24
app.MapGet("ping",(HttpContexthttpContext)=>
40
25
{
41
-
//var appUrl = app.Urls.FirstOrDefault();
42
-
//Console.WriteLine("Repo URL: " + appUrl);
43
26
return"pong";
44
27
});
45
28
@@ -58,15 +41,13 @@ public Endpoints(WebApplication app)
58
41
Console.WriteLine("Received GET request for file on resource id: "+resourceId);
59
42
returnmanager.GetFileById(resourceId);
60
43
});
61
-
//.RequireRateLimiting(ratePolicy); // TODO: Find out if retrieving files without rate limiter can be an issue (especially with streaming)
62
44
63
45
// To save incomming files (.png, .xes, .bpmn, .pnml etc)
0 commit comments