Skip to content

Commit

Permalink
[수정] axios config content type 수정 (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeap authored Aug 10, 2023
2 parents 00a5cd0 + 9e8c70b commit d11910d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugins/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ axios.interceptors.request.use(
config.headers['Authorization'] =
'Bearer ' + VueCookies.get('accessToken');
config.headers['X-refresh-token'] = VueCookies.get('refreshToken');
config.headers['Content-Type'] = 'application/json';
const regexp = /s3/;
if (regexp.test(config.url)) {
config.headers['Content-Type'] = 'multipart/form-data';
} else {
config.headers['Content-Type'] = 'application/json';
}
return config;
},
function (error) {
Expand Down

0 comments on commit d11910d

Please sign in to comment.