Files
web-inspector/backend/app/core/config.py
jungwoo choi 81b9104aea feat: 사이트 전체 검사 기능 추가
도메인 하위 링크를 BFS로 자동 크롤링하여 페이지별 검사 수행.
- BFS 링크 크롤러 (같은 도메인 필터링, max_pages/max_depth 설정)
- 사이트 검사 오케스트레이션 (크롤링→순차 검사→집계)
- SSE 실시간 진행 상태 (크롤링/검사/완료)
- 페이지 트리 + 집계 결과 UI
- UrlInputForm에 "사이트 전체 검사" 버튼 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 16:46:49 +09:00

40 lines
855 B
Python

"""
Application configuration from environment variables.
"""
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
# MongoDB
MONGODB_URL: str = "mongodb://admin:password123@localhost:27022/"
DB_NAME: str = "web_inspector"
# Redis
REDIS_URL: str = "redis://localhost:6392"
# Inspection
URL_FETCH_TIMEOUT: int = 10
CATEGORY_TIMEOUT: int = 60
MAX_HTML_SIZE: int = 10485760 # 10MB
# Site inspection
SITE_MAX_PAGES: int = 20
SITE_MAX_DEPTH: int = 2
SITE_CONCURRENCY: int = 2
# Application
PROJECT_NAME: str = "Web Inspector API"
class Config:
env_file = ".env"
case_sensitive = True
@lru_cache()
def get_settings() -> Settings:
return Settings()