CORS + basic authentication in spring boot


CORS + basic authentication in spring boot

spring boot 에서 #http #basic #authentication 을 적용하고 #react, vue 와 같은 #frontend 에서 #axios 등으로 json 형식의 body를 http request 를 보냈을때 CORS 에러가 나는 원인과 그 해결책에 대해 정리합니다. #CORS 는 너무나 유명하니 구글에서 CORS 라고 검색하면 자세하게 나오니 그걸 참고하시고 spring boot 에서 http basic authentication 적용하는 것도 구글링하면 차고 넘기게 나오니 그걸 참고하세요. 이번 포스트에서는 react, vue 와 같이 spring boot 에서 제공하는 ui 가 아니라, 별도 서버 혹은 프로세스에서 제공되는 ui 에서 spring boot로 HTTP request 를 보낼 경우 CORS 문제가 발생하는데, 이렇게 인증 + CORS 가 복합된 것에 대해 해결하는 방법에 대해 기술합니다. axios 같은 javascript의 http 라이브러리에서...


#authentication #react #preflight #http #frontend #CORS #boot #basic #axios #spring

원문링크 : CORS + basic authentication in spring boot