forked from mtusi2026/mtusi2026lab4
Реализация лабораторной работы 4 на 4
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Ошибки, созданные самим балансировщиком, — в формате ошибок контракта.
|
||||
# Ответы реплик (включая их 503) проходят без изменений: proxy_intercept_errors off.
|
||||
# X-Instance-Id здесь нет: ответ создан LB, а не API-репликой.
|
||||
|
||||
location @unavailable {
|
||||
default_type application/json;
|
||||
add_header X-Request-Id $request_id always;
|
||||
return 503 '{"error":{"code":"unavailable","message":"Нет доступной API-реплики","request_id":"$request_id"}}';
|
||||
}
|
||||
|
||||
location @too_large {
|
||||
default_type application/json;
|
||||
add_header X-Request-Id $request_id always;
|
||||
return 413 '{"error":{"code":"payload_too_large","message":"Тело запроса слишком большое","request_id":"$request_id"}}';
|
||||
}
|
||||
Reference in New Issue
Block a user