mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
add authorization
This commit is contained in:
@@ -8,4 +8,18 @@ const apiClient = axios.create({
|
||||
}
|
||||
})
|
||||
|
||||
apiClient.interceptors.request.use(function (config) {
|
||||
const username = localStorage.getItem('username')
|
||||
const password = localStorage.getItem('password')
|
||||
|
||||
if (username && password) {
|
||||
config.auth = {
|
||||
username: username.toLocaleLowerCase(),
|
||||
password: password.toLocaleLowerCase()
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
})
|
||||
|
||||
export default apiClient
|
||||
|
||||
Reference in New Issue
Block a user