问题
I am currently consuming a REST API which uses HTTP Basic Authentication.
Based on the below picture, isn't the Authorization
header supposed to be encrypted once I am using an Angular app over an HTTPS connection?
回答1:
With HTTPS, the HTTP requests/responses are sent over an SSL/TLS connection. It ensures that the entire message (including the headers) is encrypted when it is sent over the wire. If anyone intercepts the message, they won't be able to read the actual content.
However, the headers are still visible to both client and server. That's why Chrome DevTools and other debugging tools will show the values as plain text.
来源:https://stackoverflow.com/questions/50943719/authorization-header-is-not-encrypted-over-https