Skip to content

Commit

Permalink
Merge pull request #1179 from podlove/fix/pages-search
Browse files Browse the repository at this point in the history
fix(page): use correct proxy url
  • Loading branch information
alexander-heimbuch authored Jan 25, 2025
2 parents eb2c08e + 0d8884d commit a9bc713
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/page/src/features/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
<span
class="
rounded-full
bg-complementary-100
text-primary-900
bg-primary-900
text-complementary-100
px-2
p-1
mr-3
Expand Down
2 changes: 1 addition & 1 deletion apps/page/src/lib/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export const addQueryparams = (
return tmp.toString();
};

export const proxy = (url: string) => `/proxy?` + new URLSearchParams({ url })
export const proxy = (url: string) => `/api/proxy?` + new URLSearchParams({ url })
3 changes: 2 additions & 1 deletion apps/page/src/logic/sagas/layout.sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { ColorTokens, rgbColor } from '../../types/color.types';
import getImageColors from '../../lib/get-image-color';
import type { initializeThemePayload } from '../store/stores/theme.store';
import { isArray } from 'lodash-es';
import { proxy } from '../../lib/url';

export default function ({
selectSubscribeOverlayVisible,
Expand Down Expand Up @@ -65,7 +66,7 @@ export default function ({
}

if (!primaryColor && poster) {
primaryColor = yield getImageColors(`/api/proxy?url=${poster}`);
primaryColor = yield getImageColors(proxy(poster));
}

if (!primaryColor) {
Expand Down

0 comments on commit a9bc713

Please sign in to comment.