How can the browser see the token value with each ajax request sent?

Open a page in vue and then the console will see two requests

(the backend said no token was received)

clipboard.png

clipboard.png

clipboard.png

clipboard.png


your backend is not lying, he may not get "token" indeed.
because some web frameworks "rename" the parameters in the request header when they receive the request.
for example: django, will capitalize all parameter names with the prefix "HTTP_" in front of them.
then when the backend acquires header, the parameter name becomes: HTTP_TOKEN
you can have your backend print the header to have a look.


clipboard.png


Last screenshot Request Headers isn't there a line token in the last screenshot, and that's where to check it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bebdfe-31aba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bebdfe-31aba.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?