How to set the domain/prefix for the /_next/data routes
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
My app is in Vercel and runs behind a "proxy" (because of the platform I work on, the index is in a subpath of the proxy). There is no way for me to remove the proxy and I use "assetPrefix" to use the Vercel cdn, as they are static assets and don't need any authorization. The problem comes when I have pages with getServerSideProps or getStaticProps as I think they make requests to the /_next/data path if I'm not wrong, but they do it in the index of the proxy domain and should do them in the subpath. I remember trying to use basePrefix but it didn't work.
In the image, the green rectangle shows the proxy domain + the sub-path (https:// ... /account) - /onboarding is a page in Next; the red square shows that the request is being made only to the proxy domain and does not take into account the sub-path nor the domain I set in assetPrefix (as the docs say). Is there a way to change this?
In the image, the green rectangle shows the proxy domain + the sub-path (https:// ... /account) - /onboarding is a page in Next; the red square shows that the request is being made only to the proxy domain and does not take into account the sub-path nor the domain I set in assetPrefix (as the docs say). Is there a way to change this?