sonar 4 left. cookie regex
This commit is contained in:
@@ -152,6 +152,7 @@ import { simpleTimeLabel, followTimeLabel,
|
||||
} from '@/module/timeLabel.js';
|
||||
import FreqChart from './FreqChart.vue';
|
||||
import { PRIME_VUE_TICKS_LIMIT } from '../../../constants/constants.js';
|
||||
import { getCookie } from "@/utils/cookieUtil.js";
|
||||
|
||||
const primeVueTicksLimit = PRIME_VUE_TICKS_LIMIT;
|
||||
|
||||
@@ -928,7 +929,7 @@ export default {
|
||||
if (isCheckPage) {
|
||||
const conformanceStore = ConformanceStore();
|
||||
// Save token in Headers.
|
||||
const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
|
||||
const token = getCookie('luciaToken');
|
||||
|
||||
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
|
||||
switch (to.params.type) {
|
||||
|
||||
Reference in New Issue
Block a user