Skip to main content

Posts

Showing posts with the label Part 5️⃣ - Ocelot Gateway API๐Ÿ›’ Build .NET 8 eCommerce Microservice ๐Ÿš€with API Gateway

๐Ÿš€Master User Authentication in .NET 8 Web API Email Confirmation, Password Reset, 2FA & Lockout with JWT & Identity๐Ÿ”

Part 5️⃣ - Ocelot Gateway API๐Ÿ›’ Build .NET 8 eCommerce Microservice ๐Ÿš€with API Gateway, Rate Limiting, Caching & more ๐Ÿงบ

Ocelot Configuration File - ocelot.json This configuration file sets up routes for an API Gateway using Ocelot. The gateway manages requests for three main services: Authentication, Product, and Order APIs. Here's a detailed description of each section: Authentication Routes Path : /api/authentication/{everything} Host : localhost:5000 Methods : GET, POST, PUT, DELETE Rate Limiting : Allows 1 request per 10 seconds. Product Routes Get All Products Path : /api/products Host : localhost:5001 Method : GET Caching : 60 seconds with custom header eCommerce-Caching-Control . Get Product By ID Path : /api/products/{id} Host : localhost:5001 Method : GET Caching : 60 seconds with custom header eCommerce-Caching-Control . Modify Products Path : /api/products/{everything} Host : localhost:5001 Methods : POST, PUT, DELETE Authentication : Bearer token required. Order Routes Get All Orders Path : /api/orders Host : localhost:5002 Method : GET Caching : 20 seconds with custom header eCommerce-C