Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
axios UI for request logs with a react component and SSR (Next.js) support
cd example/nextjs-13
npm install
npm run dev
npm install axios-ui --save-dev
Example available in
/example/nextjs-13
see Example:
/example/nextjs-13/pages/index.ts
each route using the interceptor should add axiosUIData
to the page props
add the following to your server side requests:
// register interceptor
const { axiosInterceptor, debugToken } = registerAxiosInterceptor(...);
axiosInterceptor.intercept();
// request with debugToken header (necessary in SSR context)
axios.get(..., { headers: { 'x-axios-debug': debugToken } });
// consume intercepted request/response data
const axiosUIData = axiosInterceptor.getData();
// return data from your handler
return {...yourData, axiosUIData};
export const getServerSideProps = async (context) => {
const data = ({ axiosUIData, ...yourPageProps } = yourRequestHandler());
// add axiosUIData to pageProps
return Promise.resolve({
props: {
...yourPageProps,
axiosUIData,
},
});
};
\_app.ts
)export default function App({ Component, pageProps }: AppProps) {
<>
<AxiosUIWrapperSSR axios={axios} initialData={pageProps.axiosUIData} />
<Component {...pageProps} />
</>;
}
see Example:
/example/nextjs-13/pages/api/get-entry/[id].ts
// register interceptor
const { axiosInterceptor, debugToken } = registerAxiosInterceptor(...);
axiosInterceptor.intercept();
// request with debugToken header (necessary in SSR context)
axios.get(..., { headers: { 'x-axios-debug': debugToken } });
// consume intercepted request/response data
const axiosUIData = axiosInterceptor.getData();
// resopnd with data from your handler
return response.status(200).json({...yourData, axiosUIData});
FAQs
axios UI for request logs with a react component and SSR (Next.js) support
We found that axios-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.