Bypass router queue for LuCI static assets
This commit is contained in:
1 parent
ff05cf92dd
commit
3a120e4e28
1 file changed
+2
-1
@@ -2626,10 +2626,11 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
if body is not None:
|
if body is not None:
|
||||||
headers["Content-Length"] = str(len(body))
|
headers["Content-Length"] = str(len(body))
|
||||||
|
|
||||||
limiter = router_proxy_limiter(router_id)
|
limiter = None if is_static else router_proxy_limiter(router_id)
|
||||||
acquired = False
|
acquired = False
|
||||||
backend = None
|
backend = None
|
||||||
try:
|
try:
|
||||||
|
if limiter is not None:
|
||||||
acquired = limiter.acquire(timeout=PROXY_TIMEOUT)
|
acquired = limiter.acquire(timeout=PROXY_TIMEOUT)
|
||||||
if not acquired:
|
if not acquired:
|
||||||
self.send_text(503, "proxy busy: router is handling too many requests")
|
self.send_text(503, "proxy busy: router is handling too many requests")
|
||||||
|
|||||||
Reference in new issue
Block a user