- OpenAPI 스펙 파일을 mng/storage/api-docs/로 복사 - config 경로를 storage_path()로 변경 (Docker 호환) - 라우트 이름 수정 (dev-tools.api-explorer.* 접두사) - HTMX 트리거 수정 (input changed, autocomplete off) - openSettingsModal, showToast 함수 추가
98 lines
2.8 KiB
PHP
98 lines
2.8 KiB
PHP
<?php
|
|
|
|
return [
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| OpenAPI Spec File Path
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| api-docs.json 파일 경로
|
|
|
|
|
*/
|
|
'openapi_path' => env('API_EXPLORER_OPENAPI_PATH', storage_path('api-docs/api-docs-v1.json')),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Default Environments
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 기본 환경 설정 (사용자가 커스텀 환경을 추가하기 전 기본값)
|
|
|
|
|
*/
|
|
'default_environments' => [
|
|
[
|
|
'name' => '로컬',
|
|
'base_url' => 'http://api.sam.kr',
|
|
'api_key' => env('API_EXPLORER_LOCAL_KEY', ''),
|
|
],
|
|
[
|
|
'name' => '개발',
|
|
'base_url' => 'https://api.codebridge-x.com',
|
|
'api_key' => env('API_EXPLORER_DEV_KEY', ''),
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Proxy Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| API 프록시 설정
|
|
|
|
|
*/
|
|
'proxy' => [
|
|
'timeout' => 30, // 초
|
|
'max_body_size' => 1024 * 1024, // 1MB
|
|
'allowed_hosts' => [ // 화이트리스트
|
|
'api.sam.kr',
|
|
'api.codebridge-x.com',
|
|
'localhost',
|
|
'127.0.0.1',
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| History Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 히스토리 설정
|
|
|
|
|
*/
|
|
'history' => [
|
|
'max_entries' => 100, // 사용자당 최대
|
|
'retention_days' => 30, // 보관 기간
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Security Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 보안 설정
|
|
|
|
|
*/
|
|
'security' => [
|
|
'encrypt_tokens' => true, // API Key/Token 암호화
|
|
'mask_sensitive_headers' => [ // 히스토리에서 마스킹
|
|
'Authorization',
|
|
'X-API-KEY',
|
|
'Cookie',
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cache Settings
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| OpenAPI 스펙 캐싱 설정
|
|
|
|
|
*/
|
|
'cache' => [
|
|
'enabled' => true,
|
|
'ttl' => 3600, // 1시간
|
|
'key' => 'api_explorer_openapi_spec',
|
|
],
|
|
];
|