Skip to content

Commit

Permalink
fix: base URI
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Mar 28, 2024
1 parent 0a2f8f5 commit 4d85d90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions _config/nodeAPI/app/api/chain/[chainID]/[filename]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ type TContext = {
async function resolveNotFound(request: Request): Promise<Response> {
const fallback = new URL(request.url).searchParams.get('fallback');
if (fallback === 'true') {
const baseURI = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: (request as any)?.nextUrl?.origin;
const baseURI = 'https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/_config/nodeAPI/public';
const result = await fetch(`${baseURI}/not-found.png`);
return new Response(result.body, {
headers: {'Content-Type': 'image/png', 'Cache-Control': 'public, max-age=86400, must-revalidate'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ type TContext = {
async function resolveNotFound(request: Request): Promise<Response> {
const fallback = new URL(request.url).searchParams.get('fallback');
if (fallback === 'true') {
const baseURI = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: (request as any)?.nextUrl?.origin;
const baseURI = 'https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/_config/nodeAPI/public';
const result = await fetch(`${baseURI}/not-found.png`);
return new Response(result.body, {
headers: {
Expand Down Expand Up @@ -41,9 +39,7 @@ async function resolveNotFound(request: Request): Promise<Response> {
async function resolveGasToken(request: Request): Promise<Response> {
const fallback = new URL(request.url).searchParams.get('fallback');
if (fallback === 'true') {
const baseURI = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: (request as any)?.nextUrl?.origin;
const baseURI = 'https://raw.githubusercontent.com/SmolDapp/tokenAssets/main/_config/nodeAPI/public';
const result = await fetch(`${baseURI}/gas-token.png`);
return new Response(result.body, {
headers: {
Expand Down

0 comments on commit 4d85d90

Please sign in to comment.