Skip to content

Commit

Permalink
remove cloudfront redirect for images (#3265)
Browse files Browse the repository at this point in the history
  • Loading branch information
wentokay authored Mar 10, 2023
1 parent b888e2e commit 0010955
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions packages/common/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,6 @@ export const DEFAULT_PUBKEY_STR = "11111111111111111111111111111111";

export const MOBILE_CHANNEL_LOGS = "mobile-logs";

export const IMAGE_PROXY_URL = "https://d1a7965zcx2lcc.cloudfront.net";

export const BACKPACK_TEAM = [
"ee7ce804-44b2-4360-bfbb-28e14cd0499b",
"29c33e60-d54a-4fe4-80e9-4bbfcc6c69b8",
Expand Down
4 changes: 1 addition & 3 deletions packages/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { BigNumber } from "ethers";
import { ethers } from "ethers";
import { v1 } from "uuid";

import { IMAGE_PROXY_URL } from "./constants";

const usd = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
Expand Down Expand Up @@ -89,7 +87,7 @@ export function externalResourceUri(

export function proxyImageUrl(url: string): string {
if (url && (url.startsWith("http://") || url.startsWith("https://"))) {
return `${IMAGE_PROXY_URL}/insecure/rs:fit:400:400:0:0/plain/${url}`;
return `https://images.xnfts.dev/cdn-cgi/image/fit=contain,width=400,height=400,quality=85/${url}`;
}
return url;
}
Expand Down

1 comment on commit 0010955

@vercel
Copy link

@vercel vercel bot commented on 0010955 Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.