문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
springframework:httpstream [2022/01/04 14:23] kwon37xi [Reverse Proxy(nginx) 설정] |
springframework:httpstream [2022/01/04 17:00] (현재) kwon37xi [ServerSentEvent Reverse Proxy(nginx) 설정] |
||
---|---|---|---|
줄 3: | 줄 3: | ||
* [[springframework: | * [[springframework: | ||
- | ===== Reverse Proxy(nginx) 설정 ===== | + | ===== ServerSentEvent |
+ | * [[: | ||
+ | |||
* [[https:// | * [[https:// | ||
- | * [[https:// | ||
* [[https:// | * [[https:// | ||
* 서버측에서 '' | * 서버측에서 '' | ||
+ | * [[https:// | ||
<code java> | <code java> | ||
@RequestMapping("/ | @RequestMapping("/ | ||
줄 20: | 줄 22: | ||
} | } | ||
</ | </ | ||
- | * 아니면 nginx 의 SSE 관련 url 프록시에 대해서만 '' | + | < |
+ | # 응답 결과를 보면 X-Accel-Buffering: | ||
+ | curl -D - http:// | ||
+ | HTTP/1.1 200 | ||
+ | X-Accel-Buffering: | ||
+ | Content-Type: | ||
+ | Transfer-Encoding: | ||
+ | ... | ||
+ | </ | ||
+ | * nginx 의 SSE 관련 url 프록시에 대해서만 '' | ||
+ | * [[https:// | ||
< | < | ||
location / | location / | ||
proxy_pass http:// | proxy_pass http:// | ||
- | proxy_buffering off; | + | proxy_buffering off; # X-Accel-Buffering: |
proxy_cache off; | proxy_cache off; | ||
proxy_set_header Host $host; | proxy_set_header Host $host; | ||
줄 32: | 줄 45: | ||
} | } | ||
</ | </ | ||
+ | * [[https:// | ||
===== 참고 ===== | ===== 참고 ===== | ||
* [[https:// | * [[https:// |