How to render to new HTML page on success of API fetch request in NodeJs?
问题 I want to render a new HTML page on user request, which is only accessible if the authorization header is set correctly. I initially thought that the browser would redirect to the page, but found out that this is not the case. I have found some ways to handle this, for example replacing the DOM, but I don't think that is a good solution. Here is the fetch call from UI, which returns the HTML, but does not render it currently: fetch('/protected_route', { headers: { 'authorization': 'Bearer ' +