Commit bc05038 1 parent b4bdf37 commit bc05038 Copy full SHA for bc05038
File tree 3 files changed +19
-4
lines changed
3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
5
5
} ) ;
6
6
7
7
module . exports = withBundleAnalyzer ( {
8
+ images : {
9
+ domains : [ 'cdn.jsdelivr.net' ] ,
10
+ } ,
8
11
reactStrictMode : false ,
9
12
experimental : {
10
13
outputStandalone : true ,
Original file line number Diff line number Diff line change 3
3
Card ,
4
4
Anchor ,
5
5
AspectRatio ,
6
- Image ,
7
6
Center ,
8
7
createStyles ,
9
8
useMantineColorScheme ,
@@ -12,6 +11,7 @@ import { motion } from 'framer-motion';
12
11
import { useState } from 'react' ;
13
12
import { useSortable } from '@dnd-kit/sortable' ;
14
13
import { CSS } from '@dnd-kit/utilities' ;
14
+ import Image from 'next/image' ;
15
15
import { serviceItem } from '../../tools/types' ;
16
16
import PingComponent from '../../modules/ping/PingModule' ;
17
17
import AppShelfMenu from './AppShelfMenu' ;
@@ -121,11 +121,13 @@ export function AppShelfItem(props: any) {
121
121
} }
122
122
>
123
123
< Image
124
- styles = { { root : { cursor : 'pointer' } } }
124
+ style = { {
125
+ cursor : 'pointer' ,
126
+ } }
125
127
width = { 80 }
126
128
height = { 80 }
127
- src = { service . icon }
128
- fit = "contain"
129
+ src = { `/api/imageproxy?url= ${ service . icon } ` }
130
+ objectFit = "contain"
129
131
onClick = { ( ) => {
130
132
if ( service . openedUrl ) {
131
133
window . open ( service . openedUrl , service . newTab === false ? '_top' : '_blank' ) ;
Original file line number Diff line number Diff line change
1
+ import { NextApiRequest , NextApiResponse } from 'next' ;
2
+
3
+ export default async ( req : NextApiRequest , res : NextApiResponse ) => {
4
+ const url = decodeURIComponent ( req . query . url as string ) ;
5
+ const result = await fetch ( url ) ;
6
+ const body = await result . body ;
7
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
+ // @ts -ignore
9
+ body . pipe ( res ) ;
10
+ } ;
You can’t perform that action at this time.
0 commit comments