feat: expose API markdown doc

This commit is contained in:
ittoview
2026-05-09 17:04:22 +01:00
parent 693aa7df61
commit 1a8948761b
5 changed files with 69 additions and 3 deletions

View File

@@ -10,6 +10,15 @@ server {
}
# Markdown 接口说明,直接返回文本内容
location = /apidoc {
default_type text/markdown;
charset utf-8;
try_files /apidoc =404;
add_header Cache-Control "no-store";
}
# 知识库静态 JSON API接口路径不存在时返回 404避免被 SPA 回退到 index.html
location /api/ {
try_files $uri =404;