sub-path 배포 지원 (root_path) + HTML 상대경로화
Apache 리버스 프록시로 /plagiarism 같은 sub-path에 배포 가능하도록: - config.Settings.root_path 추가 (.env의 ROOT_PATH) - FastAPI app(root_path=...) + uvicorn run(root_path=..., proxy_headers=True, forwarded_allow_ips="*") - index.html의 모든 절대경로(/v1/..., /docs, /openapi.json)를 상대경로로 변경 - .env / .env.example 에 ROOT_PATH 추가 URL 직접 노출(localhost:8000)이든 sub-path(/plagiarism)든 모두 동작.
This commit is contained in:
1 parent
66dea0cc52
commit
b8370f5c1a
4 files changed
+17
-8
No files matched your search
@@ -12,6 +12,7 @@ class Settings(BaseSettings):
|
||||
port: int = 8000
|
||||
log_level: str = "info" # debug / info / warning / error
|
||||
reload: bool = False # 개발용 자동 재시작
|
||||
root_path: str = "" # 리버스 프록시 sub-path (예: /plagiarism)
|
||||
|
||||
engine_version: str = "o2o-plagiarism-2.0.0-pdf-v1.2"
|
||||
reference_corpus_dir: str = "./data/reference"
|
||||
|
||||
Reference in new issue
Block a user