Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 560 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 560 Bytes

SSE supported reverse proxy

sseproxy is a SSE (Server-Sent Events) supported HTTP revese proxy.

sseproxy.Proxy keeps HTTP connections too long time, so it should be better to accept minimum connections.

Usage

It can be used just like httputil.NewSingleHostReverseProxy.

import (
	"net/http"
	"net/url"
	"github.com/tama-go/sseproxy"
)

u, _ := url.Parse("http://example.com")
p := sseproxy.New(u)
http.ListenAndServe(":8080", p)