Vue.component("reverse-proxy-box", { props: ["v-reverse-proxy-ref", "v-reverse-proxy-config", "v-is-location"], data: function () { let reverseProxyRef = this.vReverseProxyRef if (reverseProxyRef == null) { reverseProxyRef = { isPrior: false, isOn: false, reverseProxyId: 0 } } let reverseProxyConfig = this.vReverseProxyConfig if (reverseProxyConfig == null) { reverseProxyConfig = { requestPath: "", stripPrefix: "", requestURI: "" } } return { reverseProxyRef: reverseProxyRef, reverseProxyConfig: reverseProxyConfig, advancedVisible: false } }, methods: { isOn: function () { return (!this.vIsLocation || this.reverseProxyRef.isPrior) && this.reverseProxyRef.isOn }, changeAdvancedVisible: function (v) { this.advancedVisible = v } }, template: `
是否启用反向代理
请求主机名(Host)

请求后端服务器时的Host,用于修改后端服务器接收到的域名,默认和客户端请求的主机名一致,通常不必填写,支持请求变量。

请求URI

\${requestURI}为完整的请求URI,可以使用类似于"\${requestURI}?arg1=value1&arg2=value2"的形式添加你的参数。

去除URL前缀

可以把请求的路径部分前缀去除后再查找文件,比如把 /web/app/index.html 去除前缀 /web 后就变成 /app/index.html

` })