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
@@ -3,6 +3,8 @@ HOST=0.0.0.0
|
||||
PORT=8000
|
||||
LOG_LEVEL=info
|
||||
RELOAD=false
|
||||
# 리버스 프록시 sub-path 배포 시. 예: /plagiarism (Apache가 /plagiarism → 컨테이너 매핑할 때)
|
||||
ROOT_PATH=
|
||||
|
||||
ENGINE_VERSION=o2o-plagiarism-2.1.0-kosimcse
|
||||
REFERENCE_CORPUS_DIR=./data/reference
|
||||
|
||||
Reference in new issue
Block a user