-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for forcing HTTP status code through HTML (for SPA) #38
Comments
Hi @rrjanbiah It's a common case when returning 404 on SPA pages. You need to configure something like _redirects on netlify, or use try_files on nginx. You should see that on the deployment guide of your SPA. |
Oh sorry, did you mean that rendora should look up on the meta tags about the http codes of the rendered pages instead of always returning 200? |
Yep, exactly. Similar to Rendertron https://github.com/GoogleChrome/rendertron#status-codes, it should support <meta name="render:status_code" content="??" /> |
It is possible to using strings.Contains on get HTML Markup after wait after DOM load |
@muhammadmuhlas Thanks for your suggestion. |
@rrjanbiah you could also use regex to get the code, but becareful using regex on html response, the cost could be expensive. |
Thank you so much for your help |
Side note: if anyone reached here through Google search
|
Since, SPA handles 404 pages in the client side, it needs a mechanism to handle HTTP status code through HTML
For example, https://github.com/GoogleChrome/rendertron#status-codes provides below syntax to pass HTTP status code from HTML:
FWIW, tagging active fork authors in case if they have better solution implemented in their fork. @PureLandFlying @plan-my-binge @muhammadmuhlas @mehdipourfar
The text was updated successfully, but these errors were encountered: