File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
### MultiversX devnet faucet (distribution) smart contract
2
2
3
3
- The frontent Dapp for the [ MultiversX ESDT Faucet Smart Contract] ( https://github.com/xdevguild/esdt-faucet-sc ) .
4
- - Based on the [ MultiversX Nextjs Dapp Template] ( https://github.com/xdevguild/nextjs-dapp-template ) .
4
+ - Based on the older version of [ MultiversX Nextjs Dapp Template] ( https://github.com/xdevguild/nextjs-dapp-template ) .
5
5
- Live app on the devnet: [ https://devnet-multiversx-esdt-faucet.netlify.app ] ( https://devnet-multiversx-esdt-faucet.netlify.app/ )
6
6
- Walkthrough video: [ https://youtu.be/yBvtM2ZqJGk ] ( https://youtu.be/yBvtM2ZqJGk )
7
7
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ interface CustomNextRequest extends NextRequest {
15
15
export function middleware ( req : CustomNextRequest ) {
16
16
const res = NextResponse . next ( ) ;
17
17
18
- if ( ! process . env . NEXT_PUBLIC_MULTIVERSX_API ) return res ;
18
+ if ( ! process . env . NEXT_PUBLIC_MULTIVERSX_API ?. includes ( '/api' ) ) return res ;
19
19
20
20
if ( req . nextUrl . pathname . startsWith ( process . env . NEXT_PUBLIC_MULTIVERSX_API ) ) {
21
21
const definedHost = process . env . API_ALLOWED_DAPP_HOST ;
Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ const nextConfig = {
14
14
} ,
15
15
reactStrictMode : true ,
16
16
async rewrites ( ) {
17
+ if ( ! process . env . MULTIVERSX_PRIVATE_API ) {
18
+ return [ ] ;
19
+ }
17
20
return [
18
21
{
19
22
source : `${ process . env . NEXT_PUBLIC_MULTIVERSX_API } /:path*` ,
20
23
destination : `${ process . env . MULTIVERSX_CUSTOM_API } /:path*` ,
24
+ destination : `${ process . env . MULTIVERSX_PRIVATE_API } /:path*` ,
21
25
} ,
22
26
] ;
23
27
} ,
You can’t perform that action at this time.
0 commit comments