[api] md 파일 갱신
This commit is contained in:
@@ -52,13 +52,13 @@ src/main/java/com/alist/api
|
||||
│ ├── migration # 마이그레이션 DB 설정
|
||||
│ └── properties # 설정 프로퍼티
|
||||
└── modules
|
||||
├── admin # 관리자 인증 API
|
||||
├── auth # 사용자 인증/SSO API
|
||||
├── admin # 관리자 인증/회원/스케줄/SSO 클라이언트 관리 API
|
||||
├── cors # DB 기반 허용 Origin 관리와 캐시 갱신 API
|
||||
├── file # 단순 업로드, SunEditor 업로드, path 기반 view/download
|
||||
├── front # 사용자 인증/SSO API와 사용자 관리 API
|
||||
├── main # 루트 응답
|
||||
├── migration # 레거시 사용자 조회
|
||||
├── tusFile # TUS 업로드 DB 기록, hook, 상태, 파일 목록/view/download/delete
|
||||
└── user # 사용자 가입/마이그레이션 조회
|
||||
```
|
||||
|
||||
리소스 파일은 아래 위치를 사용합니다.
|
||||
@@ -153,7 +153,7 @@ Windows:
|
||||
### Admin API
|
||||
|
||||
- `/admin/**` 는 별도 SecurityFilterChain을 사용합니다.
|
||||
- `/admin/auth/**` 는 공개하고, 그 외 `/admin/**` 는 `ADMIN` 권한을 요구합니다.
|
||||
- `/admin/auth/**`, `/admin/user/add` 는 공개하고, 그 외 `/admin/**` 는 `ADMIN` 권한을 요구합니다.
|
||||
- `GET /admin/auth/loginChecked` 는 토큰 재발급 없이 현재 관리자 로그인 상태만 확인합니다.
|
||||
|
||||
### API
|
||||
@@ -168,16 +168,17 @@ Windows:
|
||||
- `/actuator/health`
|
||||
- `/sso/**`
|
||||
- `/auth/**`
|
||||
- `/user/signup`
|
||||
- `/user/migrationUserList`
|
||||
- `/tusFiles/uploadAuth`
|
||||
- `/tusFiles/tusHook`
|
||||
- `/user/add`
|
||||
- `/user/migration/list`
|
||||
- `/tus/file/upload/auth`
|
||||
- `/tus/file/hook`
|
||||
- `/file/**`
|
||||
|
||||
TUS 업로드 토큰은 일반 access token이 아니므로 `/tusFiles/uploadAuth`, `/tusFiles/tusHook` 은 JWT 필터 제외 경로에도 포함되어야 합니다.
|
||||
TUS 업로드 토큰은 일반 access token이 아니므로 `/tus/file/upload/auth`, `/tus/file/hook` 은 file-domain nginx `auth_request` 설정과 Spring Security 공개 경로를 함께 맞춰야 합니다.
|
||||
|
||||
## CORS
|
||||
|
||||
`DynamicCorsFilter`가 최우선 필터로 동작하며, 허용 Origin 목록은 `CorsAllowedOriginsCache`에서 조회합니다.
|
||||
`DynamicCorsFilter`가 최우선 필터로 동작하며, 허용 Origin 목록은 `CorsCache`에서 조회합니다.
|
||||
|
||||
- 허용된 Origin에만 `Access-Control-Allow-Origin` 설정
|
||||
- Credential 허용
|
||||
@@ -194,12 +195,9 @@ file-domain nginx 의 TUS 업로드 경로는 별도 `map $http_origin $cors_all
|
||||
|
||||
DB에 기록하지 않고 파일만 저장한 뒤 업무 테이블에 저장하기 좋은 값을 반환합니다.
|
||||
|
||||
- `POST /files/upload`
|
||||
- `POST /admin/files/upload`
|
||||
- `GET /files/view?path=/uploads/...`
|
||||
- `GET /admin/files/view?path=/uploads/...`
|
||||
- `GET /files/download?path=/uploads/...`
|
||||
- `GET /admin/files/download?path=/uploads/...`
|
||||
- `POST /file/upload`
|
||||
- `GET /file/view?path=/uploads/...`
|
||||
- `GET /file/download?path=/uploads/...`
|
||||
|
||||
응답 데이터 예시:
|
||||
|
||||
@@ -220,8 +218,7 @@ DB에 기록하지 않고 파일만 저장한 뒤 업무 테이블에 저장하
|
||||
|
||||
SunEditor 업로드는 API로 저장하되, 에디터 본문에는 token이 필요 없는 file-domain URL을 저장합니다.
|
||||
|
||||
- `POST /files/suneditor/upload`
|
||||
- `POST /admin/files/suneditor/upload`
|
||||
- `POST /file/suneditor/upload`
|
||||
|
||||
응답 예시:
|
||||
|
||||
@@ -241,20 +238,20 @@ SunEditor 업로드는 API로 저장하되, 에디터 본문에는 token이 필
|
||||
|
||||
대용량 업로드는 tusd와 연동하며 API는 DB 기록, 토큰 발급, 권한 검증, hook 반영을 담당합니다.
|
||||
|
||||
- `POST /tusFiles/uploadInit`
|
||||
- `GET /tusFiles/uploadAuth`
|
||||
- `POST /tusFiles/uploadStatus`
|
||||
- `POST /tusFiles/tusHook`
|
||||
- `POST /tusFiles/uploadCancel`
|
||||
- `GET /tusFiles/list/{fileMasterIdx}`
|
||||
- `GET /tusFiles/view/{fileUuid}`
|
||||
- `GET /tusFiles/download/{fileUuid}`
|
||||
- `POST /tusFiles/delete`
|
||||
- `POST /tus/file/upload/init`
|
||||
- `GET /tus/file/upload/auth`
|
||||
- `POST /tus/file/upload/status`
|
||||
- `POST /tus/file/hook`
|
||||
- `POST /tus/file/upload/cancel`
|
||||
- `GET /tus/file/list/{fileMasterIdx}`
|
||||
- `GET /tus/file/view/{fileUuid}`
|
||||
- `GET /tus/file/download/{fileUuid}`
|
||||
- `POST /tus/file/delete`
|
||||
|
||||
운영 TUS 엔드포인트:
|
||||
|
||||
```text
|
||||
https://file-alist.pjt.kr/tus/files/
|
||||
https://file-alist.pjt.kr/tus/file/
|
||||
```
|
||||
|
||||
## file-domain 운영 메모
|
||||
@@ -264,7 +261,7 @@ https://file-alist.pjt.kr/tus/files/
|
||||
- 파일 도메인: `https://file-alist.pjt.kr`
|
||||
- nginx `/uploads/` 는 `/srv/project/alist/uploads/` 를 정적 파일로 제공합니다.
|
||||
- nginx `/uploads/tmp/` 는 임시 파일 노출 방지를 위해 404 처리합니다.
|
||||
- nginx `/tus/files/` 는 tusd로 프록시하고 `auth_request /_upload_auth` 로 `/tusFiles/uploadAuth` 를 호출합니다.
|
||||
- nginx `/tus/file/` 는 tusd로 프록시하고 `auth_request /_upload_auth` 로 `/tus/file/upload/auth` 를 호출합니다.
|
||||
|
||||
## 주요 인증 엔드포인트
|
||||
|
||||
@@ -280,7 +277,8 @@ https://file-alist.pjt.kr/tus/files/
|
||||
- `POST /admin/auth/refresh`
|
||||
- `GET /admin/auth/loginChecked`
|
||||
- `POST /admin/auth/logout`
|
||||
- `POST /user/signup`
|
||||
- `POST /user/add`
|
||||
- `POST /user/migration/list`
|
||||
|
||||
## Actuator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user