I have been working on implementing getServerSideProps
in my file named [username].js
which utilizes dynamic routing. Next.js requires the use of both getStaticPaths()
and getStaticProps({ params })
for dynamic routing. However, there seems to be an issue as I am unable to use getServerSideProps
alongside getStaticProps
. This is problematic since I rely on getServerSideProps({ req, res })
to access headers that contain crucial user information (such as req.headers['x-user-name']
). Without this data, I am unable to effectively enhance the functionality of my application. Can anyone provide guidance on how I can address this dilemma?