When working with getStaticProps and getServerSideProps in Next.js, I need to intercept and add common header properties to all request calls that are executed server-side.
axios.interceptors.request.use(function (config) {
// Perform actions before the request is sent
// For example, adding common header properties
return config;
}, function (error) {
// Handle request error
return Promise.reject(error);
});