feat: 新增后台控制前台是否显示admin、新增robots.txt

This commit is contained in:
lan
2024-07-07 15:54:01 +08:00
parent e421ab93bc
commit 3edc8c959d
26 changed files with 67 additions and 19 deletions
+6
View File
@@ -73,6 +73,11 @@ async def index():
, media_type='text/html', headers={'Cache-Control': 'no-cache'})
@app.get('/robots.txt')
async def robots():
return HTMLResponse(content=settings.robotsText, media_type='text/plain')
@app.post('/')
async def get_config():
return APIResponse(detail={
@@ -82,6 +87,7 @@ async def get_config():
'openUpload': settings.openUpload,
'notify_title': settings.notify_title,
'notify_content': settings.notify_content,
'show_admin_address': settings.showAdminAddr,
})