chore: disable openapi page cdn cache

This commit is contained in:
engigu
2026-03-10 14:06:44 +08:00
parent 8d25dd5e65
commit f4687f6cf6
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -72,6 +72,9 @@ func initOpenAPIRoutes(root *gin.RouterGroup, urlPrefix string) {
</body> </body>
</html>` </html>`
c.Header("Content-Type", "text/html; charset=utf-8") c.Header("Content-Type", "text/html; charset=utf-8")
c.Header("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate")
c.Header("Pragma", "no-cache")
c.Header("Expires", "0")
c.Status(http.StatusOK) c.Status(http.StatusOK)
c.Writer.Write([]byte(scalarHTML)) c.Writer.Write([]byte(scalarHTML))
c.Abort() c.Abort()
+1 -1
View File
@@ -253,7 +253,7 @@ onMounted(loadSettings)
</div> </div>
<p class="text-sm text-muted-foreground mb-4">开启全局 OpenAPI 直接访问能力配置后可通过请求头 <code <p class="text-sm text-muted-foreground mb-4">开启全局 OpenAPI 直接访问能力配置后可通过请求头 <code
class="bg-muted px-1.5 py-0.5 rounded text-xs select-all font-sans">Authorization: Bearer &lt;在此生成的Token&gt;</code> class="bg-muted px-1.5 py-0.5 rounded text-xs select-all font-sans">Authorization: Bearer &lt;在此生成的Token&gt;</code>
无需登录直接调用系统的所有接口请妥善保管并设置合理的有效期</p> 无需登录直接调用系统的所有接口请妥善保管并设置合理的有效期<span class="text-amber-600 dark:text-amber-500 font-medium ml-1">注意必须先开启鉴权开关才能查看接口文档页面和进行调用</span></p>
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-2 sm:gap-4 mb-4"> <div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-2 sm:gap-4 mb-4">
<Label class="sm:text-right text-muted-foreground">Token 密钥</Label> <Label class="sm:text-right text-muted-foreground">Token 密钥</Label>