Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- https://joshua1988.github.io/web-development/javascript/promise-for-beginners/
- https://appmaster.io/ko/blog/rest-apiran-mueosimyeo-dareun-yuhyeonggwa-eoddeohge-dareungayo
- https://goodgid.github.io/HTTP-Communicate-Process/
- https://sewonzzang.tistory.com/22
- https://siyoon210.tistory.com/130
- https://aws.amazon.com/ko/docker/
- https://jcon.tistory.com/189
- https://hi-zini.tistory.com/entry/%EB%B9%84%EB%8F%99%EA%B8%B0%EC%A0%81-%EB%B0%A9%EC%8B%9D-%EC%B2%98%EB%A6%AC-%EB%B0%A9%EB%B2%95-Callback-Promise-async-await
- https://joshua1988.github.io/web-development/javascript/js-async-await/
- https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html
Archives
- Today
- Total
“Connecting the dots”
CORS 본문
반응형
CORS?
브라우저에서는 보안적인 이유로 cross-origin HTTp 요청들을 제한 그래서 cross-origin요청을 하려면 서버의 동의가 필요
서버가 동의한다면 브라우저에서는 요청을 허락 동의하지 않는다면 브라우저에서 거절
허락을 구하고 거절하는 메커니즘을 HTTP-header를 이용해서 가능 이를 CORS 라고 부릅니다
브라우저에서는 cross-origin 요청을 안전하게 할 수 있도록 하는 메케니즘
cross-origin
- 프로토콜 -Http와https는 프로토콜이 다르다
- 도메인 -domain,com과 other-domain.com은 다르다
- 포트번호= 8080포트와 3000포트는 다르다
CORS 동작방법
- Simple requsers인 경우
- 서버로 요청
- 서버응답후 브라우저가 요청한 Origin 과 응답한 헤더 Access -Control-Request-Headers값을 비교 유효한 요청이면 리소스 응답 만약 유효하지 않은 요청이면 브라우자 에서 이를 막고 에러 발생
SImple request?
HTTP method가 다음중 하나
- GET
- HEAD
- POST
자동으로 설정되는 헤더느 제외 설정할 수 있는 다음헤더
- Accept
- Accept-Language
- Content-Language
Content-Type
- application/x-www-form-urlencoded
- multipart/form-data
- text/plain
Simple request 라고 부른다
반응형
'5주차' 카테고리의 다른 글
소셜로그인 프로세스의 이해 (0) | 2022.11.30 |
---|---|
Payment / Iamport (0) | 2022.11.30 |
인증(Authentication) / 인가 (Authorization) (0) | 2022.11.30 |