HTTP 헤더 참조
HTTP 요청 및 응답 헤더의 완전한 참조 자료입니다.
33 headers
Media types the client can process (e.g. application/json, text/html).
Accept: text/html,application/xhtml+xmlContent encodings the client supports (gzip, deflate, br).
Accept-Encoding: gzip, deflate, brPreferred natural languages for the response.
Accept-Language: en-US,en;q=0.9Credentials for HTTP authentication.
Authorization: Bearer eyJhbGc...Directives for caching mechanisms in both requests and responses.
Cache-Control: no-cache, no-storeControl options for the current connection.
Connection: keep-aliveSize of the request/response body in bytes.
Content-Length: 348Media type of the request/response body.
Content-Type: application/json; charset=utf-8HTTP cookies previously sent by the server.
Cookie: session=abc123; user=johnDomain name and port of the server. Required in HTTP/1.1.
Host: www.example.com:443Makes the request conditional; returns 304 if not modified.
If-Modified-Since: Mon, 18 Jul 2016 02:36:04 GMTMakes request conditional using ETags.
If-None-Match: "737060cd8c284d8af7ad3082f209582d"The origin that initiated the request (for CORS).
Origin: https://developer.example.comAddress of the previous web page that linked to the current page.
Referer: https://developer.example.com/pageApplication, OS, vendor, and version of the requesting client.
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)Indicates whether the response can be shared with code from the given origin.
Access-Control-Allow-Origin: *HTTP methods allowed when accessing the resource for CORS.
Access-Control-Allow-Methods: GET, POST, PUTHeaders that can be used during the actual CORS request.
Access-Control-Allow-Headers: Content-Type, AuthorizationEncoding applied to the response body (gzip, br, etc.).
Content-Encoding: gzipControls resources the user agent is allowed to load.
Content-Security-Policy: default-src 'self'Identifier for a specific version of a resource (for caching).
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"Date/time after which the response is considered stale.
Expires: Thu, 01 Dec 2025 16:00:00 GMTDate/time when the resource was last modified.
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMTURL to redirect to for 3xx responses or the URL of the newly created resource.
Location: /new-pageHow long to wait before making another request (rate limiting/503).
Retry-After: 120Send a cookie from the server to the user agent.
Set-Cookie: id=a3fWa; Expires=Thu, 21 Oct 2025 07:28:00 GMT; Secure; HttpOnlyForce HTTPS for all future connections (HSTS).
Strict-Transport-Security: max-age=31536000; includeSubDomainsForm of encoding used to safely transfer the payload body.
Transfer-Encoding: chunkedDetermines which request headers to use for cache key.
Vary: Accept-Encoding, Accept-LanguageAuthentication method to access the resource (sent with 401).
WWW-Authenticate: Basic realm="Access to staging site"Prevent MIME type sniffing.
X-Content-Type-Options: nosniffIndicate whether the response can be framed (clickjacking protection).
X-Frame-Options: DENYEnable XSS filtering in older browsers (deprecated, use CSP instead).
X-XSS-Protection: 1; mode=block이 도구 소개
HTTP 헤더 레퍼런스는 가장 널리 사용되는 요청 및 응답 헤더를 알기 쉬운 설명과 예시 값으로 정리합니다. 보안에 중요한 헤더는 빨간색으로 강조 표시됩니다.
카테고리(Request, Response, Both)로 필터링하거나 헤더 이름과 키워드로 검색해 필요한 항목을 빠르게 찾을 수 있습니다.
사용 방법
- 검색창에 헤더 이름이나 키워드를 입력하면 목록이 즉시 필터링됩니다.
- 카테고리 드롭다운을 사용해 Request, Response, Both 헤더만 표시할 수 있습니다.
- 각 항목에는 헤더 이름, 카테고리 배지, 설명, 예시 값이 표시됩니다.
- 서버나 HTTP 클라이언트를 설정할 때 예시 값을 참고용으로 활용하세요.
활용 사례
백엔드 엔지니어는 배포 전에 올바른 보안 헤더(CSP, HSTS, X-Frame-Options)를 설정합니다. 프런트엔드 개발자는 Access-Control 헤더를 이용해 CORS 문제를 디버깅합니다. HTTP를 배우는 학생들은 이 레퍼런스로 프로토콜의 동작 방식을 이해합니다.
자주 묻는 질문
- 요청 헤더와 응답 헤더의 차이는 무엇인가요? — 요청 헤더는 클라이언트가 컨텍스트(허용 타입, 인증 정보 등)를 전달하기 위해 보냅니다. 응답 헤더는 서버가 응답에 대한 메타데이터(콘텐츠 타입, 캐싱, 보안 등)를 담아 보냅니다.
- 보안을 위해 모든 사이트가 추가해야 할 헤더는 무엇인가요? — 최소한 모든 응답에 Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options를 설정해야 합니다.
- 여기에 모든 HTTP 헤더가 나열되어 있나요? — 아니요. 이 레퍼런스는 가장 널리 쓰이는 표준 헤더와 보안 헤더를 중심으로 다룹니다. 전체 목록은 MDN의 HTTP 헤더 문서를 참고하세요.