Skip to content

Commit

Permalink
fix: send cookies across origins
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkontoask committed Dec 22, 2020
1 parent bcc0f50 commit 2910e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const isDevelopment = getNodeEnv() === 'development'
const baseURL = isDevelopment ? '' : VUE_APP_BUILD_BASE_URL

const http: AxiosInstance = Axios.create({
withCredentials: true,
baseURL: baseURL,
timeout: 20000
})

http.interceptors.request.use(
config => {
config.headers.cookie = document.cookie
return config
},
error => {
Expand Down

0 comments on commit 2910e6a

Please sign in to comment.