Vue.component("http-web-root-box", { props: ["v-root-config", "v-is-location", "v-is-group"], data: function () { let config = this.vRootConfig if (config == null) { config = { isPrior: false, isOn: false, dir: "", indexes: [], stripPrefix: "", decodePath: false, isBreak: false, exceptHiddenFiles: true, onlyURLPatterns: [], exceptURLPatterns: [] } } if (config.indexes == null) { config.indexes = [] } if (config.onlyURLPatterns == null) { config.onlyURLPatterns = [] } if (config.exceptURLPatterns == null) { config.exceptURLPatterns = [] } return { config: config, 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.config.indexes.push(resp.data.index) } }) }, removeIndex: function (i) { this.config.indexes.$remove(i) }, isOn: function () { return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn } }, template: `
启用静态资源分发
静态资源根目录

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

首页文件
{{index}}

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

例外URL

如果填写了例外URL,表示不支持通过这些URL访问。

限制URL

如果填写了限制URL,表示仅支持通过这些URL访问。

排除隐藏文件

排除以点(.)符号开头的隐藏目录或文件,比如/.git/logs/HEAD

去除URL前缀

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

路径解码

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

终止请求

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

` })