SAIF.Platform.AspNetCore¶
Provides ASP.NET Core middleware and HTTP client extensions for propagating slot routing across service-to-service calls in PR slot deployments.
Getting started¶
Register and use slot routing in your service:
AddSlotRouting()— registersSlotRoutingMiddlewareandSlotRoutingDelegatingHandler, and wires the handler intoConfigureHttpClientDefaultsso thex-saif-slot-routingvalue is forwarded on all outboundHttpClientrequests (including calls to external services) when a slot is active.UseSlotRouting()— adds the middleware to the request pipeline. Must be called before endpoint middleware.
Services that already use AddJwtBearerServices() or AddOpenIdConnectServices() from SAIF.Platform.Authentication.AspNetCore do not need to call these explicitly — slot routing is registered automatically. See that package's README for the other direction of this coupling.