I'm trying to secure my web site, i want to hide Authorization or just hide token.
i'm using angular 7, and IIS server.
this is when i use my token in Front-end side:
var headerOptions = new Headers({
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.token,
'contrat_token': this.contrat_token
});
let options = new RequestOptions({
search: params,
headers: headerOptions
});
return this._http.get(url, options).pipe(map(resp => {
if (resp.status === 401 || resp.status == 401 || resp.status.toString() == "401") {
this.clearCookie();
}
else {
let reponse = JSON.parse(resp.json());
if (reponse == -1 || reponse == "-1") {
this.router.navigate(["/"]);
}
}
return JSON.parse(resp.json())
}
), catchError((error) => {
if (error.status == 401 || error.status == "401") {
this.clearCookie();
}
return of();
})
);
i see that in request headers :
Authorization: Bearer THL8iBl4y4QTMh8sz8UluO3vDbtVib2Axp-_zYcPRGQVesnzDJVdFVq3GsYXeo4znSMbGqKNmLcGL_inNsMWAtc22
i want to see something like :
Authorization: Bearer ******************