I have an Angular application that stores JWT tokens in localstorage to provide authentication. What I want to do is figure out how to grab this JWT token and insert it into an HTTP GET request, that renders as a completely new web page (NOT a returned object from an XMLHTTP request that displays in the same page...).Come faccio a modificare l'intestazione di autorizzazione di una richiesta HTTP GET proveniente da un collegamento ipertestuale (<a href> tag)
Is this possible? The only way I've found to do something similar would be to use basic HTTP authorization, such as:
username:[email protected]
And I'm assuming I could pass in my entire JWT there.
I'm using Express.js to handle routing on my Node.js backend.
Questo è esattamente quello che sto cercando di fare. Come si inserisce il token nell'intestazione? – Leif
che il comando è lo standard $ http modulo che apre una richiesta XMLHTTP e restituisce un oggetto, correggere? Voglio un collegamento regolare a una pagina completamente nuova. Vorrei evitare di inserirlo nell'URL come parametro "?" se possibile – Leif
è possibile 't impostare un campo di intestazione con un collegamento regolare –