GitXplorerGitXplorer
m

reverso

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
c21cc49664df29acc5e6c600de628eddca2e9ac8

Added support for chunked transfer encoding

mmmmarcos committed 2 years ago
Unverified
b7e53f677901aa3436b1b8ae988ced740e3feab2

Updated README.md

mmmmarcos committed 2 years ago
Unverified
3962df2550441699da2d9cdc992d6496e590e4fb

Some minor refactoring

mmmmarcos committed 2 years ago
Unverified
67d580d8960032e39040f23f1c98a3e95a2824bb

Added X-Forwarded-For header

mmmmarcos committed 2 years ago
Unverified
70cf79f79bc7bf8d1d7e9a4fb07a525e10ac7cee

Switched to 502 (Bad Gateway) status code

mmmmarcos committed 2 years ago
Unverified
60226612894b931b1ea35b62e4b3cfdca59c49af

Proxy request is now performed with http.DefaultTransport.RoundTrip

mmmmarcos committed 2 years ago

README

The README file for this repository.

README

A simple HTTP reverse proxy written in Go.

Usage

This single-host reverse proxy listens on localhost:8080 and forwards requests to localhost:8081. Responses are stored in an in-memory cache if they include an "Expires" header. The cached responses are indexed by the request URL path.

An example "echo" server is included in cmd/origin. It allows you to control the response's Expires header based on the request's URL-encoded query string (see README.md).

Disclaimer

This code was written for a coding challenge: write an HTTP reverse proxy with a caching feature, without using net/http/httputil. Also, this is my very first project written in Go (you have been warned!).

For a full-featured open-source reverse proxy and load balancer you should check Traefik Proxy ;)