mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-08-29 03:57:31 +08:00
feat: 添加Web验证页面并优化密钥管理功能
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
from fastapi import HTTPException, Header
|
||||
from typing import Optional
|
||||
from app.core.logger import get_security_logger
|
||||
from app.core.config import settings
|
||||
|
||||
logger = get_security_logger()
|
||||
|
||||
def verify_auth_token(token: str) -> bool:
|
||||
return token == settings.AUTH_TOKEN
|
||||
|
||||
class SecurityService:
|
||||
def __init__(self, allowed_tokens: list, auth_token: str):
|
||||
|
||||
Reference in New Issue
Block a user