@@ -461,10 +461,10 @@ const (
461461
462462// RewriteConfig is the rule config for proxy-rewrite plugin.
463463type RewriteConfig struct {
464- RewriteTarget string `json:"uri,omitempty"`
465- RewriteTargetRegex []string `json:"regex_uri,omitempty"`
466- Headers * Headers `json:"headers,omitempty"`
467- Host string `json:"host,omitempty"`
464+ RewriteTarget string `json:"uri,omitempty" yaml:"uri,omitempty" `
465+ RewriteTargetRegex []string `json:"regex_uri,omitempty" yaml:"regex_uri,omitempty" `
466+ Headers * Headers `json:"headers,omitempty" yaml:"headers,omitempty" `
467+ Host string `json:"host,omitempty" yaml:"host,omitempty" `
468468}
469469
470470type Headers struct {
@@ -475,12 +475,12 @@ type Headers struct {
475475
476476// ResponseRewriteConfig is the rule config for response-rewrite plugin.
477477type ResponseRewriteConfig struct {
478- StatusCode int `json:"status_code,omitempty"`
479- Body string `json:"body,omitempty"`
480- BodyBase64 bool `json:"body_base64,omitempty"`
481- Headers * ResponseHeaders `json:"headers,omitempty"`
482- LuaRestyExpr []expr.Expr `json:"vars,omitempty"`
483- Filters []map [string ]string `json:"filters,omitempty"`
478+ StatusCode int `json:"status_code,omitempty" yaml:"status_code,omitempty" `
479+ Body string `json:"body,omitempty" yaml:"body,omitempty" `
480+ BodyBase64 bool `json:"body_base64,omitempty" yaml:"body_base64,omitempty" `
481+ Headers * ResponseHeaders `json:"headers,omitempty" yaml:"headers,omitempty" `
482+ LuaRestyExpr []expr.Expr `json:"vars,omitempty" yaml:"vars,omitempty" `
483+ Filters []map [string ]string `json:"filters,omitempty" yaml:"filters,omitempty" `
484484}
485485
486486type ResponseHeaders struct {
@@ -491,12 +491,12 @@ type ResponseHeaders struct {
491491
492492// RequestMirror is the rule config for proxy-mirror plugin.
493493type RequestMirror struct {
494- Host string `json:"host"`
494+ Host string `json:"host" yaml:"host" `
495495}
496496
497497// RedirectConfig is the rule config for redirect plugin.
498498type RedirectConfig struct {
499- HttpToHttps bool `json:"http_to_https,omitempty"`
500- URI string `json:"uri,omitempty"`
501- RetCode int `json:"ret_code,omitempty"`
499+ HttpToHttps bool `json:"http_to_https,omitempty" yaml:"http_to_https,omitempty" `
500+ URI string `json:"uri,omitempty" yaml:"uri,omitempty" `
501+ RetCode int `json:"ret_code,omitempty" yaml:"ret_code,omitempty" `
502502}
0 commit comments