2021-06-01 09:56:39 +02:00
|
|
|
package lib
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Request sent to plugins
|
|
|
|
type Request struct {
|
|
|
|
URL string
|
|
|
|
RemoteAddr string
|
|
|
|
Host string
|
|
|
|
Header http.Header
|
|
|
|
Route string // final destination
|
|
|
|
Match struct {
|
|
|
|
Server string
|
|
|
|
Src string
|
|
|
|
Dst string
|
|
|
|
ProviderID string
|
|
|
|
PingURL string
|
|
|
|
MatchType string
|
|
|
|
AssetsLocation string
|
|
|
|
AssetsWebRoot string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Response from plugin's handler call
|
|
|
|
type Response struct {
|
2021-09-07 07:23:47 +02:00
|
|
|
StatusCode int
|
|
|
|
HeadersIn http.Header
|
|
|
|
HeadersOut http.Header
|
|
|
|
OverrideHeadersIn bool // indicates plugin removing all the original incoming headers
|
|
|
|
OverrideHeadersOut bool // indicates plugin removing all the original outgoing headers
|
2021-06-01 09:56:39 +02:00
|
|
|
}
|