์ฐ์ CORS๋ Cross-Origin Resource Sharing์ผ๋ก ๊ต์ฐจ(๋ค๋ฅธ) ์ถ์ฒ ๋ฆฌ์์ค ๊ณต์ ์ด๋ค.
์ถ์ฒ๊ฐ ์๋ก ๊ฐ๋ค๊ณ ํ๋จํ๋ ๋ก์ง ์์ฒด๋ ๊ต์ฅํ ๊ฐ๋จํ๋ค.
๋ URL ๊ตฌ์ฑ ์์ ์ค Scheme, Host, Port, ์ด 3๊ฐ์ง๋ง ๋์ผํ๋ฉด ๋๋ค.
ex) https://evan-moon.github.io:80
CORS๋ ์๋ก ๋ค๋ฅธ ์ถ์ฒ๊ฐ์ ๋ฆฌ์์ค๋ฅผ ์ ๋ฌํ๋ ๋ฐฉ์์ ์ ์ดํ๋ ์ฒด์ .
CORS์์ฒญ์ด ๊ฐ๋ฅ ํ๋ ค๋ฉด ์๋ฒ์์ ํน์ ํค๋์ธ Access-Control-ALlow-Origin๊ณผ ํจ๊ป ์๋ตํ ํ์๊ฐ ์๋ค.
์น ํ๋ก ํธ ์ธก์์ request header์ CORS ๊ด๋ จ ์ต์ ์ ๋ฃ์ด์ฃผ๊ณ , ์๋ฒ์์๋ ํด๋น ํ๋ก ํธ ์์ฒญ์ ํ์ฉํ๋ฉด ๋จ
https://popcorn16.tistory.com/154
https://xiubindev.tistory.com/115