You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a NextJS app that uses the pages router in Azure SWA. It is literally just an npx create-next-app with one page configured to get data from a headless CMS inside getStaticProps and then display the data on the page.
I have then set up an api route in Next that uses .revalidate() to revalidate the page (code below).
Everything works fine when I create and locally host a production build using npm run build and npm run start. Everything also works when I deploy to Vercel. I change the data in the CMS > call the API route to trigger revalidation > reload page > see changes. Just not seeing the same results in Azure SWA, as the content is not updating.
Using npx create-next-app also creates an api endpoint /hello which i have tested after deploying to Azure SWA and that seems to be working fine.
I am on the free hosting plan. not sure if this makes any difference?
To Reproduce
Steps to reproduce the behavior:
Create new Next app using npx create-next-app using the pages directory.
Configure '/' page to get data from headless CMS.
Create api route using code above.
Deploy to Azure SWA.
Update content in headless CMS.
Call API endpoint to revalidate page.
Refresh page hosted on Azure SWA - content should have updated but it hasn't.
Describe the bug
I have a NextJS app that uses the pages router in Azure SWA. It is literally just an npx create-next-app with one page configured to get data from a headless CMS inside getStaticProps and then display the data on the page.
I have then set up an api route in Next that uses .revalidate() to revalidate the page (code below).
Everything works fine when I create and locally host a production build using npm run build and npm run start. Everything also works when I deploy to Vercel. I change the data in the CMS > call the API route to trigger revalidation > reload page > see changes. Just not seeing the same results in Azure SWA, as the content is not updating.
Using npx create-next-app also creates an api endpoint /hello which i have tested after deploying to Azure SWA and that seems to be working fine.
I am on the free hosting plan. not sure if this makes any difference?
To Reproduce
Steps to reproduce the behavior:
API route that handles revalidation request:
Expected behavior
Same steps as the To Reproduce section, except the final step sees updated content. Again - this is working locally and in Vercel.
Device info (if applicable):
Not device specific. Tried across multiple machines.
Additional context
My first time creating an issue in Github. Please let me know if any more details are needed.
The text was updated successfully, but these errors were encountered: