mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 09:16:40 +00:00
Add option to rewrite redirects
This commit is contained in:
@@ -399,6 +399,9 @@ type ProxyMapping struct {
|
||||
// When true, the original Host header from the client request is passed
|
||||
// through to the backend instead of being rewritten to the backend's address.
|
||||
PassHostHeader bool `protobuf:"varint,8,opt,name=pass_host_header,json=passHostHeader,proto3" json:"pass_host_header,omitempty"`
|
||||
// When true, Location headers in backend responses are rewritten to replace
|
||||
// the backend address with the public-facing domain.
|
||||
RewriteRedirects bool `protobuf:"varint,9,opt,name=rewrite_redirects,json=rewriteRedirects,proto3" json:"rewrite_redirects,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProxyMapping) Reset() {
|
||||
@@ -489,6 +492,13 @@ func (x *ProxyMapping) GetPassHostHeader() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ProxyMapping) GetRewriteRedirects() bool {
|
||||
if x != nil {
|
||||
return x.RewriteRedirects
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// SendAccessLogRequest consists of one or more AccessLogs from a Proxy.
|
||||
type SendAccessLogRequest struct {
|
||||
state protoimpl.MessageState
|
||||
|
||||
Reference in New Issue
Block a user