Azure functions Azure函数代理静态站点的路由
我在blob存储中托管了一个Hugo生成的静态站点,根路径显示的站点很好。但是,当我点击指向任何其他页面的链接时,我会收到以下错误。我已经验证了实际blob的存在,所以我认为这是proxies.json文件的问题 这里是错误Azure functions Azure函数代理静态站点的路由,azure-functions,azure-function-app-proxy,Azure Functions,Azure Function App Proxy,我在blob存储中托管了一个Hugo生成的静态站点,根路径显示的站点很好。但是,当我点击指向任何其他页面的链接时,我会收到以下错误。我已经验证了实际blob的存在,所以我认为这是proxies.json文件的问题 这里是错误 <Error> <Code>BlobNotFound</Code> <Message> The specified blob does not exist. RequestId:304b66fb-
<Error>
<Code>BlobNotFound</Code>
<Message>
The specified blob does not exist. RequestId:304b66fb-401e-00a0-2763-
d2f5b4000000 Time:2018-04-12T13:37:06.9267123Z
</Message>
</Error>
这是我的原始proxies.json文件。我经历了一些变化,但似乎没有任何效果
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"root": {
"matchCondition": {
"route": "/"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/index.html"
},
"firstlevel": {
"matchCondition": {
"route": "/{level1}/{item}"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/{level1}/{item}"
},
"secondlevel": {
"matchCondition": {
"route": "/{level1}/{level2}/{item}"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/{level1}/{level2}/{item}"
},
"thirdlevel": {
"matchCondition": {
"route": "/{level1}/{level2}/{level3}/{item}"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/{level1}/{level2}/{level3}/{item}"
},
"fourthlevel": {
"matchCondition": {
"route": "/{level1}/{level2}/{level3}/{level4}/{item}"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/{level1}/{level2}/{level3}/{level4}/{item}"
},
"rest": {
"matchCondition": {
"route": "{*restOfPath}"
},
"backendUri": "https://e.blob.core.windows.net/site-content-jrb-fyi/{restOfPath}"
}
}
}
以下是容器中的文件结构
├───关于
├───博客
│ ├───ghost不是我的博客引擎
│ ├───hugo与azure函数代理
│ └───页
│ └───1.
├───类别
│ ├───蔚蓝色的
│ │ └───页
│ │ └───1.
│ ├───azure函数代理
│ │ └───页
│ │ └───1.
│ ├───cms
│ │ └───页
│ │ └───1.
│ ├───鬼
│ │ └───页
│ │ └───1.
│ └───雨果
│ └───页
│ └───1.
├───css
├───字体
├───img
│ └───主要的
├───js
└───标签
任何帮助都将不胜感激
谢谢
John我知道这是旧的,但当您的blob容器未设置为允许匿名只读访问时,会出现此错误 从Azure门户,您可以更新一个或多个容器的公共访问级别:
您是否尝试过使用此处的步骤()进行调试,以确保生成的URL完全符合预期(文件扩展名和所有文件扩展名)?我没有。不知道为什么我在研究中没有偶然发现这个联系。我要试一试。谢谢我很想知道答案是什么!:)