Vue.component("http-web-root-box", { props: ["v-root-config", "v-is-location"], data: function () { let rootConfig = this.vRootConfig if (rootConfig == null) { rootConfig = { isPrior: false, isOn: true, dir: "", indexes: [], stripPrefix: "", decodePath: false, isBreak: false } } if (rootConfig.indexes == null) { rootConfig.indexes = [] } return { rootConfig: rootConfig, advancedVisible: false } }, methods: { changeAdvancedVisible: function (v) { this.advancedVisible = v }, addIndex: function () { let that = this teaweb.popup("/servers/server/settings/web/createIndex", { height: "10em", callback: function (resp) { that.rootConfig.indexes.push(resp.data.index) } }) }, removeIndex: function (i) { this.rootConfig.indexes.$remove(i) }, isOn: function () { return (!this.vIsLocation || this.rootConfig.isPrior) && this.rootConfig.isOn } }, template: `
是否开启
文档根目录

可以访问此根目录下的静态资源。

首页文件
{{index}}

在URL中只有目录没有文件名时默认查找的首页文件。

去除URL前缀

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

路径解码

是否对请求路径进行URL解码,比如把 /Web+App+Browser.html 解码成 /Web App Browser.html 再查找文件。

是否终止请求

在找不到要访问的文件的情况下是否终止请求并返回404,如果选择终止请求,则不再尝试反向代理等设置。

` })