public class UpstreamURLRewriteParameters extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| UpstreamURLRewriteParameters() | 
| UpstreamURLRewriteParameters(UpstreamURLRewriteParameters source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getAction()Get 回源 URL 重写动作。取值有:
replace:指替换完整路径。用于将完整的请求 URL Path 替换为指定路径。
addPrefix:指增加路径前缀。用于增加指定路径前缀至请求 URL Path。
rmvPrefix:指移除路径前缀。用于移除请求 URL Path 的指定路径前缀。
regexReplace:指正则替换完整路径。用于通过 Google RE2 正则表达式匹配和替换完整路径。
 | 
| String | getRegex()Get 回源 URL 重写用于正则替换匹配完整路径的正则表达式。需要满足 Google RE2 规范,长度范围为 1~1024。当 Action 为 regexReplace 时,此字段必填,否则无需填写此字段。 | 
| String | getType()Get 回源 URL 重写类型。仅支持填写 Path。 | 
| String | getValue()Get 回源 URL 重写值。需要满足 URL Path 规范,且保证重写后的 Path 以 / 开头,以防止回源 URL 的 Host 被修改,长度范围为 1~1024。当 Action 为 addPrefix 时,不能以 / 结尾;当 Action 为 rmvPrefix 时,不能存在 *;当 Action 为 regexReplace 时,支持用 $NUM 引用正则捕获组,其中 NUM 代表组编号,如 $1,最多支持 $9。 | 
| void | setAction(String Action)Set 回源 URL 重写动作。取值有:
replace:指替换完整路径。用于将完整的请求 URL Path 替换为指定路径。
addPrefix:指增加路径前缀。用于增加指定路径前缀至请求 URL Path。
rmvPrefix:指移除路径前缀。用于移除请求 URL Path 的指定路径前缀。
regexReplace:指正则替换完整路径。用于通过 Google RE2 正则表达式匹配和替换完整路径。
 | 
| void | setRegex(String Regex)Set 回源 URL 重写用于正则替换匹配完整路径的正则表达式。需要满足 Google RE2 规范,长度范围为 1~1024。当 Action 为 regexReplace 时,此字段必填,否则无需填写此字段。 | 
| void | setType(String Type)Set 回源 URL 重写类型。仅支持填写 Path。 | 
| void | setValue(String Value)Set 回源 URL 重写值。需要满足 URL Path 规范,且保证重写后的 Path 以 / 开头,以防止回源 URL 的 Host 被修改,长度范围为 1~1024。当 Action 为 addPrefix 时,不能以 / 结尾;当 Action 为 rmvPrefix 时,不能存在 *;当 Action 为 regexReplace 时,支持用 $NUM 引用正则捕获组,其中 NUM 代表组编号,如 $1,最多支持 $9。 | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic UpstreamURLRewriteParameters()
public UpstreamURLRewriteParameters(UpstreamURLRewriteParameters source)
public String getType()
public void setType(String Type)
Type - 回源 URL 重写类型。仅支持填写 Path。public String getAction()
public void setAction(String Action)
Action - 回源 URL 重写动作。取值有:
public String getValue()
public void setValue(String Value)
Value - 回源 URL 重写值。需要满足 URL Path 规范,且保证重写后的 Path 以 / 开头,以防止回源 URL 的 Host 被修改,长度范围为 1~1024。当 Action 为 addPrefix 时,不能以 / 结尾;当 Action 为 rmvPrefix 时,不能存在 *;当 Action 为 regexReplace 时,支持用 $NUM 引用正则捕获组,其中 NUM 代表组编号,如 $1,最多支持 $9。public String getRegex()
public void setRegex(String Regex)
Regex - 回源 URL 重写用于正则替换匹配完整路径的正则表达式。需要满足 Google RE2 规范,长度范围为 1~1024。当 Action 为 regexReplace 时,此字段必填,否则无需填写此字段。Copyright © 2025. All rights reserved.