From 931cbef0632096daf2b9f34383f86f47dfa49611 Mon Sep 17 00:00:00 2001 From: Martin <84458356+marxtin@users.noreply.github.com> Date: Tue, 3 Mar 2026 15:41:25 +0100 Subject: [PATCH] chore: remove old asset + images hostnames from configuration provider, tests and preview --- packages/components/src/Image/Image.test.ts | 30 +------------------ .../src/hooks/useComponentsConfiguration.tsx | 6 +--- packages/storybook/.storybook/preview.tsx | 6 +--- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/packages/components/src/Image/Image.test.ts b/packages/components/src/Image/Image.test.ts index 499c2534..ee427658 100644 --- a/packages/components/src/Image/Image.test.ts +++ b/packages/components/src/Image/Image.test.ts @@ -11,7 +11,7 @@ import { const cdnConfiguration = { hostname: 'cdn.t3n.de', - originHostnames: ['storage.googleapis.com', 'images.t3n.de', 'assets.t3n.de'], + originHostnames: ['storage.googleapis.com'], }; describe('testIsFastlyUrl', () => { @@ -22,18 +22,6 @@ describe('testIsFastlyUrl', () => { cdnConfiguration, ), ).toBe(true); - expect( - testIsFastlyUrl( - 'https://images.t3n.de/bucket/path/example.jpg', - cdnConfiguration, - ), - ).toBe(true); - expect( - testIsFastlyUrl( - 'https://assets.t3n.de/bucket/path/example.jpg', - cdnConfiguration, - ), - ).toBe(true); expect( testIsFastlyUrl( 'https://cdn.t3n.de/bucket/path/example.jpg', @@ -67,22 +55,6 @@ describe('generateFastlySrc', () => { cdnConfiguration, ), ).toBe('https://cdn.t3n.de/bucket/path/example.jpg?class=default'); - expect( - generateFastlySrc( - 'https://images.t3n.de/bucket/path/example.jpg', - 'responsive-medium', - cdnConfiguration, - ), - ).toBe( - 'https://cdn.t3n.de/bucket/path/example.jpg?class=responsive-medium', - ); - expect( - generateFastlySrc( - 'https://assets.t3n.de/bucket/path/example.jpg', - 'responsive-large', - cdnConfiguration, - ), - ).toBe('https://cdn.t3n.de/bucket/path/example.jpg?class=responsive-large'); expect( generateFastlySrc( 'https://cdn.t3n.de/bucket/path/example.jpg', diff --git a/packages/components/src/hooks/useComponentsConfiguration.tsx b/packages/components/src/hooks/useComponentsConfiguration.tsx index 04d4516f..1e794203 100644 --- a/packages/components/src/hooks/useComponentsConfiguration.tsx +++ b/packages/components/src/hooks/useComponentsConfiguration.tsx @@ -15,11 +15,7 @@ export type ComponentsConfigurationProviderProps = { export const defaultComponentsConfiguration: ComponentsConfiguration = { cdn: { hostname: 'cdn.t3n.de', - originHostnames: [ - 'storage.googleapis.com', - 'images.t3n.de', - 'assets.t3n.de', - ], + originHostnames: ['storage.googleapis.com'], }, }; diff --git a/packages/storybook/.storybook/preview.tsx b/packages/storybook/.storybook/preview.tsx index 30b8788c..b508b91d 100644 --- a/packages/storybook/.storybook/preview.tsx +++ b/packages/storybook/.storybook/preview.tsx @@ -34,11 +34,7 @@ const preview: Preview = { configuration={{ cdn: { hostname: 'cdn.t3n.de', - originHostnames: [ - 'storage.googleapis.com', - 'images.t3n.de', - 'assets.t3n.de', - ], + originHostnames: ['storage.googleapis.com'], }, }} >