[CORS] Axios 응답 객체에 Content-Disposition 누락 이슈 해결


[CORS] Axios 응답 객체에 Content-Disposition 누락 이슈 해결

글을 쓰게 된 계기 진행 중인 프로젝트 간단한 스펙 설명 - Spring Boot - TypeScript - Mybatis 엑셀 기능 개발 중 Axios 응답 객체에서 Content-Disposition을 찾을 수 없는 문제가 발생함. 분명히 아래 코드와 같이 서버단에서 응답 헤더에 파일명을 설정을 했는데 //파일명 인코딩 String encodedFilename = URLEncoder.encode(tblName+"목록","UTF-8"); //헤더에 파일명 세팅 response.setHeader("content-disposition", "attachment; filename=\"" + encodedFilename + ".xlsx\""); //콘텐츠 타입 설정 response.setContentType(..


원문링크 : [CORS] Axios 응답 객체에 Content-Disposition 누락 이슈 해결