You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

SimpleReverseProxy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

SimpleReverseProxy

A lightweight and simple reverse proxy middleware for ASP.NET Core applications. Enables routing and forwarding HTTP requests to configured destinations with support for request/response streaming.

0.0.3
nugetNuGet
Version published
Maintainers
1
Created
Source

Simple Reverse Proxy

A lightweight reverse proxy middleware for ASP.NET Core applications that allows forwarding requests to different destinations based on route configurations.

Installation

Install via NuGet Package Manager:

dotnet add package SimpleReverseProxy

Usage

  • Add the reverse proxy services in your Program.cs or Startup.cs:
services.AddReverseProxy(Configuration.GetSection("ReverseProxy"));
  • Add the middleware to your application pipeline:
app.UseSimpleReverseProxy();
  • Configure the reverse proxy in your appsettings.json:
{
  "ReverseProxy": {
      "Sources": [
      {
        "DestinationId": "api1",
        "Routes": [ "users", "products" ]
      },
      {
        "DestinationId": "api2",
        "Routes": [ "orders", "payments" ]
      }
    ],
    "Destinations": [
      {
        "DestinationId": "api1",
        "Url": "https://api1.example.com"
      },
      {
        "DestinationId": "api2",
        "Url": "https://api2.example.com"
      }
    ]
  }
}

With this configuration:

  • Requests to /users and /products will be forwarded to https://api1.example.com
  • Requests to /orders and /payments will be forwarded to https://api2.example.com

License

MIT

Keywords

reverse-proxy

FAQs

Package last updated on 06 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.