<?xml version="1.0" encoding="utf-8"?> 
<rss version="2.0"
  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
  xmlns:atom="http://www.w3.org/2005/Atom">

<channel>

<title>Discover Docker, K8s and Hashicorp Nomad with Maksym Prokopov: posts tagged server sent events</title>
<link>https://blog.it-premium.com.ua/tags/server-sent-events/</link>
<description>The blog about containerisation, virtual machines and useful shell snippets and findings</description>
<author></author>
<language>en</language>
<generator>Aegea 11.3 (v4134)</generator>

<itunes:subtitle>The blog about containerisation, virtual machines and useful shell snippets and findings</itunes:subtitle>
<itunes:image href="" />
<itunes:explicit></itunes:explicit>

<item>
<title>nginx-proxy configuration for server sent events and SSL</title>
<guid isPermaLink="false">157</guid>
<link>https://blog.it-premium.com.ua/all/nginx-proxy-configuration-for-server-sent-events-and-ssl/</link>
<pubDate>Tue, 18 Oct 2016 10:07:28 +0100</pubDate>
<author></author>
<comments>https://blog.it-premium.com.ua/all/nginx-proxy-configuration-for-server-sent-events-and-ssl/</comments>
<description>
&lt;p&gt;I’ve encountered issue with dropped SSE connection when deployed SSE based sinatra app with SSL certificates and nginx-proxy docker container.&lt;/p&gt;
&lt;p&gt;First, create vhost.d directory on host and connect it to /etc/nginx/vhost.d in nginx-proxy container via volume. Create corresponding file to your VIRTUAL_HOST name, which will be included upon nginx startup. In my case that was SSE stream.it-premium.com.ua.&lt;/p&gt;
&lt;p&gt;My /home/nexus/vhost.d/stream.it-premium.com.ua file is following&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;proxy_set_header Connection &amp;#039;&amp;#039;;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But it has still issues with dropped connection.&lt;br /&gt;
Finally I’ve updated app code with following headers:&lt;/p&gt;
&lt;pre class="e2-text-code"&gt;&lt;code class=""&gt;response[&amp;#039;Cache-control&amp;#039;] = &amp;#039;no-cache&amp;#039;
response[&amp;#039;X-Accel-Buffering&amp;#039;] = &amp;#039;no&amp;#039;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And everything run smoothly after deploy.&lt;/p&gt;
</description>
</item>


</channel>
</rss>