Chrome 98버전부터 CORS 관련 정책이 강화됨에 따라 문의가 간간이 들어온다.
그 중 오늘은 Access-Control-Request-Private-Network 관련해서 짚어볼까 한다.
https://wicg.github.io/private-network-access/
Private Network Access
Abstract This document specifies modifications to Fetch and HTML which are intended to mitigate the risks associated with unintentional exposure of devices and servers on a client’s internal network to the web at large. This specification was previously
wicg.github.io
CORS-RFC1918 에 따라 크롬 브라우저는 98버전부터 CORS 체크를 모든 request에 적용하게 되었는데
웹 개발의 가장 큰 디펜던시인 크롬에서 이를 적용함에 따라, CORS 를 고려하지 않은 사이트에서 장애가 발생하였다.
CORS 관련 여러 헤더가 있겠지만 그 중, Access-Control-Request-Private-Network 는
request와 response에 모두 포함이 되어 있어야 하는데
그렇지 않은 경우 개발자도구에서 CORS 에러로 표기가 된다.
https://developer.chrome.com/blog/private-network-access-preflight/
Private Network Access: introducing preflights - Chrome Developers
Chrome is deprecating access to private network endpoints from non-secure public websites as part of the Private Network Access specification. Read on for recommended actions.
developer.chrome.com
요약하자면,
- Access-Control-Request-Private-Network: true is set on all PNA preflight requests
- Access-Control-Allow-Private-Network: true must be set on all PNA preflight responses
'기타' 카테고리의 다른 글
Dithering된 이미지와 Grayscale 이미지의 차이 (0) | 2023.03.29 |
---|---|
Captive Portal (0) | 2022.10.25 |
InteliJ Lisences : Ultimate, Community (0) | 2021.05.01 |
Case Naming Convention : CamelCase, snake_case, strHungarian (0) | 2021.04.30 |
pseudo-code (의사코드) (0) | 2021.04.28 |
댓글