@@ -46,7 +46,7 @@ app.get('/api/github/rich-address-wallet/:endpoint', async (req, res) => {
4646 }
4747
4848 // Make the actual request to GitHub API
49- const response = await axios . get ( `https://api.github.com/repos/Pymmdrza/Rich-Address-Wallet/releases/ ${ endpoint } ` , {
49+ const response = await axios . get ( `https://api.github.com/repos/Pymmdrza/Rich-Address-Wallet/${ endpoint } ` , {
5050 headers : {
5151 'Accept' : 'application/json' ,
5252 'User-Agent' : 'BlockHub-App/1.0'
@@ -77,12 +77,12 @@ app.get('/health/status', (req, res) => {
7777// Setup API proxies
7878// Bitcoin API proxy
7979app . use ( '/api/v2' , createProxyMiddleware ( {
80- target : 'https://btcbook.guarda.co ' ,
80+ target : 'https://bitcoin.atomicwallet.io ' ,
8181 changeOrigin : true ,
8282 pathRewrite : { '^/api/v2' : '/api/v2' } ,
8383 headers : {
8484 'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' ,
85- 'Referer' : 'https://guarda.co /'
85+ 'Referer' : 'https://atomicwallet.io /'
8686 } ,
8787 onProxyReq : ( proxyReq ) => {
8888 proxyReq . setHeader ( 'Accept' , 'application/json' ) ;
@@ -131,8 +131,7 @@ app.get('/api/proxy', async (req, res) => {
131131 const allowedDomains = [
132132 'api.github.com' ,
133133 'blockchain.info' ,
134- 'ws.blockchain.info' ,
135- 'btcbook.guarda.co'
134+ 'bitcoin.atomicwallet.io'
136135 ] ;
137136
138137 const url = new URL ( endpoint ) ;
@@ -197,15 +196,14 @@ app.use((req, res, next) => {
197196 next ( ) ;
198197} ) ;
199198
200- // Handle client-side routing
199+ // For any request that doesn't match the above, send the index.html file
201200app . get ( '*' , ( req , res ) => {
202201 res . sendFile ( path . join ( __dirname , '../dist/index.html' ) ) ;
203202} ) ;
204203
205204// Start the server
206205app . listen ( PORT , ( ) => {
207206 console . log ( `Server running on port ${ PORT } ` ) ;
208- console . log ( `Server Domain Address : ${ process . env . DOMAIN || 'localhost' } ` )
209207 console . log ( `Environment: ${ process . env . NODE_ENV || 'development' } ` ) ;
210208 logStream . write ( `[${ new Date ( ) . toISOString ( ) } ] Server started on port ${ PORT } \n` ) ;
211209} ) ;
@@ -225,4 +223,4 @@ process.on('uncaughtException', (err) => {
225223 console . error ( 'Uncaught exception:' , err ) ;
226224 logStream . write ( `[${ new Date ( ) . toISOString ( ) } ] Uncaught exception: ${ err . message } \n${ err . stack } \n` ) ;
227225 process . exit ( 1 ) ;
228- } ) ;
226+ } ) ;
0 commit comments