feat(core,ecommerce,ckeditor5,board,admin_basic): 공개 자산 직접 URL(CDN) 서빙 옵트인
StorageInterface::url 의 public 하드코딩을 완화하고 core.storage.filter_url 훅을 신설해, 완전 공개 자산(상품·카테고리·리뷰·에디터 이미지)의 직접 URL 서빙을 옵트인으로 열었다. 미설정 시 기존 스트리밍 100% 보존. 디스크 결정은 확장 개별 설정 > 코어 전역 > 미설정 순이며, 서빙·삭제·이동은 행에 기록된 disk 를 따라 전환 전후 자산이 혼재해도 각자 실제 저장 위치를 향한다. 고아 disk(공급 플러그인 비활성화)는 스트리밍으로 폴백해 500 이 되지 않는다. 공개 이슈 (@lyg-kaban 건의) 대응.
This commit is contained in:
1 parent
37fad55333
commit
057e002ad1
125 files changed
+5913
-203
No files matched your search
@@ -40,6 +40,17 @@ abstract class AbstractExtensionServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected array $storageServices = [];
|
||||
|
||||
/**
|
||||
* 카테고리별 StorageInterface 가 필요한 서비스 클래스 매핑 (클래스 ⇒ 카테고리).
|
||||
*
|
||||
* 등록된 클래스에는 getStorageFor($category) 인스턴스가 주입되어, 확장이
|
||||
* getStorageDiskFor() 를 오버라이드하면 해당 서비스의 put/getDisk() 가
|
||||
* 서비스 코드 무수정으로 카테고리 디스크를 따릅니다.
|
||||
*
|
||||
* @var array<class-string, string>
|
||||
*/
|
||||
protected array $storageCategoryServices = [];
|
||||
|
||||
/**
|
||||
* CacheInterface 가 필요한 서비스 클래스 목록.
|
||||
*
|
||||
@@ -111,13 +122,17 @@ abstract class AbstractExtensionServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function registerStorageBindings(): void
|
||||
{
|
||||
if (empty($this->storageServices)) {
|
||||
return;
|
||||
if (! empty($this->storageServices)) {
|
||||
$this->app->when($this->storageServices)
|
||||
->needs(StorageInterface::class)
|
||||
->give(fn () => $this->resolveExtension()->getStorage());
|
||||
}
|
||||
|
||||
$this->app->when($this->storageServices)
|
||||
->needs(StorageInterface::class)
|
||||
->give(fn () => $this->resolveExtension()->getStorage());
|
||||
foreach ($this->storageCategoryServices as $service => $category) {
|
||||
$this->app->when($service)
|
||||
->needs(StorageInterface::class)
|
||||
->give(fn () => $this->resolveExtension()->getStorageFor($category));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user