Sec-WebSocket-Accept

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Sec-WebSocket-Accept 헤더는 웹소켓 오프닝 핸드셰이크에 사용됩니다. 이는 응답 헤더에 나타납니다. 즉, 이 헤더는 서버가 웹소켓 연결을 시작할 의향을 알리기 위해 서버에서 클라이언트로 전송하는 헤더입니다.

헤더 타입 요청 헤더
금지된 헤더 이름 아니요

구문

http
Sec-WebSocket-Accept: <hashed key>

지시어

<hashed key>

서버는 핸드셰이크 요청에서 전송된 Sec-WebSocket-Key의 값을 가져와서 258EAFA5-E914-47DA-95CA-C5AB0DC85B11을 덧붙이고, 새 값의 SHA-1 값을 가져온 다음, base64로 인코딩합니다.

예제

http
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=

명세서

Specification
The WebSocket Protocol
# section-11.3.3

같이 보기

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Sec-WebSocket-Accept

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support