We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85fb7fe commit 5c99637Copy full SHA for 5c99637
06-rest-api/02-auth/03-storage/front/src/core/api/api.helpers.ts
@@ -2,11 +2,11 @@ import axios from 'axios';
2
3
export const setHeader = (header: string, value: string) => {
4
axios.defaults.headers.common[header] = value;
5
- sessionStorage.setItem(header, value);
+ localStorage.setItem(header, value);
6
};
7
8
export const restoreHeader = (header: string) => {
9
- const value = sessionStorage.getItem(header);
+ const value = localStorage.getItem(header);
10
if (value) {
11
12
}
0 commit comments