fix: allow unauthenticated access to token-based file downloads
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 2m37s
Run Tests / Backend Tests (push) Failing after 5m2s
Run Tests / Frontend Tests (push) Failing after 2m7s
Run Tests / Backend Tests (pull_request) Failing after 5m5s
Run Tests / Frontend Tests (pull_request) Failing after 2m25s
Run Tests / Test Summary (push) Failing after 14s
Run Tests / Test Summary (pull_request) Failing after 12s
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 2m37s
Run Tests / Backend Tests (push) Failing after 5m2s
Run Tests / Frontend Tests (push) Failing after 2m7s
Run Tests / Backend Tests (pull_request) Failing after 5m5s
Run Tests / Frontend Tests (pull_request) Failing after 2m25s
Run Tests / Test Summary (push) Failing after 14s
Run Tests / Test Summary (pull_request) Failing after 12s
This commit is contained in:
@@ -66,7 +66,7 @@ def _sanitize_filename(name: str) -> str:
|
||||
return name
|
||||
|
||||
|
||||
@router.get("/browse")
|
||||
@router.get("/browse", dependencies=[Depends(require_admin())])
|
||||
def browse(path: str = ""):
|
||||
try:
|
||||
target = _safe_path(path)
|
||||
@@ -94,7 +94,7 @@ def browse(path: str = ""):
|
||||
return {"path": str(target.relative_to(BASE)), "entries": entries}
|
||||
|
||||
|
||||
@router.post("/download-token")
|
||||
@router.post("/download-token", dependencies=[Depends(require_admin())])
|
||||
def create_download_token(path: str):
|
||||
"""Generate a temporary download token for large file downloads."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user