/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/SessionAffinity/AppBuilderSessionAffinityExtensions.cs
24 строки
923 B
Kahbazi
File Scoped Namespaces (#1352)
12 ноя 2021, 21:53
Не верифицирован
12 ноя 2021, 21:53
44f13d9
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Yarp.ReverseProxy.SessionAffinity; namespace Microsoft.AspNetCore.Builder; /// <summary> /// Extensions for adding proxy middleware to the pipeline. /// </summary> public static class AppBuilderSessionAffinityExtensions { /// <summary> /// Checks if a request has an established affinity relationship and if the associated destination is available. /// This should be placed before load balancing and other destination selection components. /// Requests without an affinity relationship will be processed normally and have the affinity relationship /// established by a later component. /// </summary> public static IReverseProxyApplicationBuilder UseSessionAffinity(this IReverseProxyApplicationBuilder builder) { builder.UseMiddleware<SessionAffinityMiddleware>(); return builder; } }