You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure存储的Allure报告嵌入Confluence遇404及路径重写问题求助

问题:Azure存储Allure报告嵌入Confluence HTML include宏出现404错误

我在Azure DevOps生成Allure报告后,将其托管在Azure存储账户中,尝试通过Confluence的HTML include宏嵌入分享时,出现错误:js net::ERR_ABORTED 404 (Not Found)。

Azure存储账户结构

Azure存储账户结构

index.html内容

<!DOCTYPE html>
<html dir="ltr">
<head>
    <meta charset="utf-8">
    <title>Allure Report</title>
    <link rel="favicon" href="favicon.ico?v=2">
    <link rel="stylesheet" type="text/css" href="styles.css">
        <link rel="stylesheet" href="plugins/screen-diff/styles.css">
</head>
<body>
<div id="alert"></div>
<div id="content">
    <span class="spinner">
        <span class="spinner__circle"></span>
    </span>
</div>
<div id="popup"></div>
<script src="app.js"></script>
    <script src="plugins/behaviors/index.js"></script>
    <script src="plugins/packages/index.js"></script>
    <script src="plugins/screen-diff/index.js"></script>
</body></html>

排查尝试

我尝试为script标签添加绝对路径,例如:

<script src="https://<my_allure_report_url>/$web/$(Build.BuildNumber)/app.js"></script>

但出现新错误,如:https://<confluence___url>/pages/widgets/executors.json 404 (Not Found)
新错误截图

疑问与需求

不清楚Confluence的HTML include宏为何会重写文件路径,想请教解决方法——是否需要修改index.html、配置Azure CDN,或是安装Confluence自定义插件?

另外,必须使用Azure存储账户存储Allure报告(需存储大量报告),已知Azure存储静态网站无法配置web.config,而Allure文档推荐的以下MIME类型配置仅适用于Azure Web App,对存储账户无效:

请注意:如果使用Azure Website或IIS,Allure使用的部分文件类型默认未启用,请添加如下MIME类型到web.config以支持.json和.woff文件类型。

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
     </staticContent>
    </system.webServer>
</configuration>

内容的提问来源于stack exchange,提问作者kostukp96

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 19:34:55