Origin

Origin request 헤더는 fetch가 시작되는 위치입니다. 경로 정보는 포함하지 않고 서버 이름만 포함합니다. POST requests에 포함되는 것처럼, CORS requests 와 함께 전송합니다. Referer 헤더와 비슷하지만, origin 헤더는 전체 경로를 공개하지 않습니다.

주의: HEADGET 메서드를 통해 Fetch requests를 사용할 때 Origin 헤더가 설정되지 않았습니다. (이 문제는 파이어폭스 65에서 수정되었습니다 — bug 1508661참조).

Header type Request header
Forbidden header name yes

문법

Origin: null
Origin: <scheme> "://" <hostname> [ ":" <port> ]

지시

<scheme>
사용하는 프로토콜. 일반적으로 HTTP 프로토콜 혹은 보안 버전인 HTTPS를 사용합니다.
<hostname>
서버(가상 호스팅)의 이름 또는 IP 입니다.
<port> Optional
서버와 연결을 맺기 위한 TCP 포트 번호. 포트번호를 입력하지 않으면, 요청한 서비스의 기본 포트(HTTP의 경우 "80")가 사용됩니다.

예제

Origin: https://developer.mozilla.org

명세서

Specification Comment
RFC 6454, section 7: Origin The Web Origin Concept
Fetch
The definition of 'Origin header' in that specification.
Supplants the Origin header as defined in RFC6454.

브라우저 적합성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
OriginChrome Full support YesEdge Full support 12
Notes
Full support 12
Notes
Notes Not sent with POST requests, see bug 10482384.
Firefox Full support 70
Full support 70
Full support 59
Notes Disabled
Notes Sent with non-CORS requests since Fx59, unless they are GET or HEAD.
Disabled From version 59: this feature is behind the network.http.sendOriginHeader preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Partial support Partial
Notes
Notes Not sent with POST requests until Firefox 58, see bug 446344.
IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 59
Notes Disabled
Full support 59
Notes Disabled
Notes Sent with non-CORS requests since Fx59, unless they are GET or HEAD.
Disabled From version 59: this feature is behind the network.http.sendOriginHeader preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Partial support Partial
Notes
Notes Not sent with POST requests until Firefox 58, see bug 446344.
Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also