mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-10 11:42:27 +08:00
refactor: nginx 透传外层代理 IP 头并禁用审计日志页面的审计记录
- Dockerfile.app/local: 使用 map 指令智能处理 X-Real-IP 和 X-Forwarded-For, 有外层代理头则透传,否则使用 remote_addr - audit.py: 查看审计日志不再产生审计记录,避免刷新页面时产生大量无意义日志
This commit is contained in:
@@ -107,6 +107,9 @@ class AdminGetAuditLogsAdapter(AdminApiAdapter):
|
||||
limit: int
|
||||
offset: int
|
||||
|
||||
# 查看审计日志本身不应该产生审计记录,避免刷新页面时产生大量无意义的日志
|
||||
audit_log_enabled: bool = False
|
||||
|
||||
async def handle(self, context): # type: ignore[override]
|
||||
db = context.db
|
||||
cutoff_time = datetime.now(timezone.utc) - timedelta(days=self.days)
|
||||
|
||||
Reference in New Issue
Block a user