mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02:00
fixed route gone after container restart / Brename
This commit is contained in:
@@ -2,7 +2,6 @@ package middleware
|
||||
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
D "github.com/yusing/go-proxy/internal/docker"
|
||||
E "github.com/yusing/go-proxy/internal/error"
|
||||
@@ -52,11 +51,8 @@ var realIPOptsDefault = func() *realIPOpts {
|
||||
func NewRealIP(opts OptionsRaw) (*Middleware, E.NestedError) {
|
||||
riWithOpts := new(realIP)
|
||||
riWithOpts.m = &Middleware{
|
||||
impl: riWithOpts,
|
||||
before: func(next http.HandlerFunc, w ResponseWriter, r *Request) {
|
||||
riWithOpts.setRealIP(r)
|
||||
next(w, r)
|
||||
},
|
||||
impl: riWithOpts,
|
||||
before: Rewrite(riWithOpts.setRealIP),
|
||||
}
|
||||
riWithOpts.realIPOpts = realIPOptsDefault()
|
||||
err := Deserialize(opts, riWithOpts.realIPOpts)
|
||||
|
||||
Reference in New Issue
Block a user