mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
chore(web): commented local endpoints
This commit is contained in:
@@ -43,14 +43,14 @@ export default function useTokens() {
|
||||
}
|
||||
}
|
||||
|
||||
const baseUrl = 'http://localhost:5000'
|
||||
const isAbsoluteURLRegex = /^(?:\w+:)\/\//
|
||||
// const baseUrl = 'http://localhost:5000'
|
||||
// const isAbsoluteURLRegex = /^(?:\w+:)\/\//
|
||||
|
||||
const setAxiosRequestHeader = (accessToken: string) => {
|
||||
axios.interceptors.request.use(function (config: any) {
|
||||
if (!isAbsoluteURLRegex.test(config.url)) {
|
||||
config.url = baseUrl + config.url
|
||||
}
|
||||
// if (!isAbsoluteURLRegex.test(config.url)) {
|
||||
// config.url = baseUrl + config.url
|
||||
// }
|
||||
config.headers.Authorization = `Bearer ${accessToken}`
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user