Hello everyone,
I'm currently working on setting up error pages for a React SPA app. I've been following the documentation provided at the link below:
https://github.com/niekraaijmakers/aem-spa-editor-errorpages-example
However, when I try to access a non-existing page, I receive a 404 HTML response. Despite this, the subsequent model.json call returns a 403, causing the SPA to render the 403 page instead of the expected 404.
Any insights or suggestions on how to resolve this issue would be greatly appreciated. Thank you!
update: After investigating further, I found that publish admin user were able to access these pages and received the expected 404 response. The issue might be related to anonymous users permission, but I am not sure which permission I should assign to the anonymous user for the expected 404 scenario.