mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-28 20:01:50 +01:00
v0.5-rc2: added reload cooldown, fixed auto reload, updated API
This commit is contained in:
@@ -19,10 +19,9 @@ import (
|
||||
|
||||
type (
|
||||
HTTPRoute struct {
|
||||
Alias PT.Alias `json:"alias"`
|
||||
|
||||
TargetURL URL
|
||||
PathPatterns PT.PathPatterns
|
||||
Alias PT.Alias `json:"alias"`
|
||||
TargetURL *URL `json:"target_url"`
|
||||
PathPatterns PT.PathPatterns `json:"path_patterns"`
|
||||
|
||||
mux *http.ServeMux
|
||||
handler *P.ReverseProxy
|
||||
@@ -53,7 +52,7 @@ func NewHTTPRoute(entry *P.Entry) (*HTTPRoute, E.NestedError) {
|
||||
if !ok {
|
||||
r = &HTTPRoute{
|
||||
Alias: entry.Alias,
|
||||
TargetURL: URL(*entry.URL),
|
||||
TargetURL: (*URL)(entry.URL),
|
||||
PathPatterns: entry.PathPatterns,
|
||||
handler: rp,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user