Skip to content

Commit f46c4c3

Browse files
committed
Site updated at 2018-02-09 17:08:52 UTC
1 parent dfd3a81 commit f46c4c3

File tree

35 files changed

+1022
-104
lines changed

35 files changed

+1022
-104
lines changed

about/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ <h1 class="entry-title">About</h1>
9999
<h1>Recent Posts</h1>
100100
<ul id="recent_posts">
101101

102+
<li class="post">
103+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
104+
</li>
105+
102106
<li class="post">
103107
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
104108
</li>
@@ -115,10 +119,6 @@ <h1>Recent Posts</h1>
115119
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
116120
</li>
117121

118-
<li class="post">
119-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
120-
</li>
121-
122122
</ul>
123123
</section>
124124

@@ -133,7 +133,7 @@ <h1>Recent Posts</h1>
133133
</div>
134134
</div>
135135
<footer role="contentinfo"><p>
136-
Copyright &copy; 2017 - Douglas Cameron -
136+
Copyright &copy; 2018 - Douglas Cameron -
137137
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
138138
</p>
139139

atom.xml

+23-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title><![CDATA[Nyami's Blog]]></title>
55
<link href="http://www.nyami.uk/atom.xml" rel="self"/>
66
<link href="http://www.nyami.uk/"/>
7-
<updated>2017-11-30T22:07:12+00:00</updated>
7+
<updated>2018-02-09T17:08:48+00:00</updated>
88
<id>http://www.nyami.uk/</id>
99
<author>
1010
<name><![CDATA[Douglas Cameron]]></name>
@@ -13,6 +13,28 @@
1313
<generator uri="http://octopress.org/">Octopress</generator>
1414

1515

16+
<entry>
17+
<title type="html"><![CDATA[Simple Ping Middleware]]></title>
18+
<link href="http://www.nyami.uk/blog/2018/02/09/simple-ping-middleware/"/>
19+
<updated>2018-02-09T16:18:39+00:00</updated>
20+
<id>http://www.nyami.uk/blog/2018/02/09/simple-ping-middleware</id>
21+
<content type="html"><![CDATA[<p>If you find yourself needing to create a simple ping endpoint often used by load balancers as a quick check to see if traffic can be directed to your site, rather than complicating the simple and creating an MVC controller etc consider simple middleware.</p>
22+
23+
<!--more-->
24+
25+
26+
<p>The ASP.NET Core request pipeline consists of a sequence of request delegates, these delegates are configured using <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.RunExtensions?view=aspnetcore-2.0">Run</a>, <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.MapExtensions?view=aspnetcore-2.0">Map</a> and <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.AspNetCore.Builder.UseExtensions?view=aspnetcore-2.0">Use</a>, and for our simple ping endpoint Map is a perfect fit. Map will create a branch in the pipeline allowing you to break out of the normal flow which could have the advantage as it can keep this as lightweight as you need. The following can be used to return a 200 response to indicate our site should be good to go, if you need to add some health checks or additional logic you could create more complex middleware.</p>
27+
28+
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
29+
<span class='line-number'>2</span>
30+
</pre></td><td class='code'><pre><code class=''><span class='line'>app.Map("/ping",
31+
</span><span class='line'> ping => ping.Run(async conext => await conext.Response.WriteAsync("ok")));</span></code></pre></td></tr></table></div></figure>
32+
33+
34+
<p>For more information on Middleware check out <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?tabs=aspnetcore2x#writing-middleware">ASP.NET Core Middleware</a></p>
35+
]]></content>
36+
</entry>
37+
1638
<entry>
1739
<title type="html"><![CDATA[Creating a Self-Signed Certificate for Identity Provider]]></title>
1840
<link href="http://www.nyami.uk/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/"/>

blog/2014/12/14/a-blog-is-born/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ <h1>Comments</h1>
228228
<h1>Recent Posts</h1>
229229
<ul id="recent_posts">
230230

231+
<li class="post">
232+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
233+
</li>
234+
231235
<li class="post">
232236
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
233237
</li>
@@ -244,10 +248,6 @@ <h1>Recent Posts</h1>
244248
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
245249
</li>
246250

247-
<li class="post">
248-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
249-
</li>
250-
251251
</ul>
252252
</section>
253253

@@ -262,7 +262,7 @@ <h1>Recent Posts</h1>
262262
</div>
263263
</div>
264264
<footer role="contentinfo"><p>
265-
Copyright &copy; 2017 - Douglas Cameron -
265+
Copyright &copy; 2018 - Douglas Cameron -
266266
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
267267
</p>
268268

blog/2015/01/07/tfvc-and-nuget-updates/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ <h1>Comments</h1>
179179
<h1>Recent Posts</h1>
180180
<ul id="recent_posts">
181181

182+
<li class="post">
183+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
184+
</li>
185+
182186
<li class="post">
183187
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
184188
</li>
@@ -195,10 +199,6 @@ <h1>Recent Posts</h1>
195199
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
196200
</li>
197201

198-
<li class="post">
199-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
200-
</li>
201-
202202
</ul>
203203
</section>
204204

@@ -213,7 +213,7 @@ <h1>Recent Posts</h1>
213213
</div>
214214
</div>
215215
<footer role="contentinfo"><p>
216-
Copyright &copy; 2017 - Douglas Cameron -
216+
Copyright &copy; 2018 - Douglas Cameron -
217217
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
218218
</p>
219219

blog/2016/07/09/a-blog-is-reborn/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ <h1>Comments</h1>
187187
<h1>Recent Posts</h1>
188188
<ul id="recent_posts">
189189

190+
<li class="post">
191+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
192+
</li>
193+
190194
<li class="post">
191195
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
192196
</li>
@@ -203,10 +207,6 @@ <h1>Recent Posts</h1>
203207
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
204208
</li>
205209

206-
<li class="post">
207-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
208-
</li>
209-
210210
</ul>
211211
</section>
212212

@@ -221,7 +221,7 @@ <h1>Recent Posts</h1>
221221
</div>
222222
</div>
223223
<footer role="contentinfo"><p>
224-
Copyright &copy; 2017 - Douglas Cameron -
224+
Copyright &copy; 2018 - Douglas Cameron -
225225
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
226226
</p>
227227

blog/2016/07/13/radbutton-single-click/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ <h1>Comments</h1>
170170
<h1>Recent Posts</h1>
171171
<ul id="recent_posts">
172172

173+
<li class="post">
174+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
175+
</li>
176+
173177
<li class="post">
174178
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
175179
</li>
@@ -186,10 +190,6 @@ <h1>Recent Posts</h1>
186190
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
187191
</li>
188192

189-
<li class="post">
190-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
191-
</li>
192-
193193
</ul>
194194
</section>
195195

@@ -204,7 +204,7 @@ <h1>Recent Posts</h1>
204204
</div>
205205
</div>
206206
<footer role="contentinfo"><p>
207-
Copyright &copy; 2017 - Douglas Cameron -
207+
Copyright &copy; 2018 - Douglas Cameron -
208208
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
209209
</p>
210210

blog/2016/10/06/bash-i-forgot-sudo/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ <h1>Comments</h1>
165165
<h1>Recent Posts</h1>
166166
<ul id="recent_posts">
167167

168+
<li class="post">
169+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
170+
</li>
171+
168172
<li class="post">
169173
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
170174
</li>
@@ -181,10 +185,6 @@ <h1>Recent Posts</h1>
181185
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
182186
</li>
183187

184-
<li class="post">
185-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
186-
</li>
187-
188188
</ul>
189189
</section>
190190

@@ -199,7 +199,7 @@ <h1>Recent Posts</h1>
199199
</div>
200200
</div>
201201
<footer role="contentinfo"><p>
202-
Copyright &copy; 2017 - Douglas Cameron -
202+
Copyright &copy; 2018 - Douglas Cameron -
203203
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
204204
</p>
205205

blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/index.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ <h1 class="entry-title">Creating a Self-Signed Certificate for Identity Provider
189189
<a class="basic-alignment left" href="/blog/2016/10/06/bash-i-forgot-sudo/" title="Previous Post: Bash - I forgot sudo">&laquo; Bash - I forgot sudo</a>
190190

191191

192+
<a class="basic-alignment right" href="/blog/2018/02/09/simple-ping-middleware/" title="Next Post: Simple ping Middleware">Simple ping Middleware &raquo;</a>
193+
192194
</p>
193195
</footer>
194196
</article>
@@ -207,6 +209,10 @@ <h1>Comments</h1>
207209
<h1>Recent Posts</h1>
208210
<ul id="recent_posts">
209211

212+
<li class="post">
213+
<a href="/blog/2018/02/09/simple-ping-middleware/">Simple Ping Middleware</a>
214+
</li>
215+
210216
<li class="post">
211217
<a href="/blog/2017/11/18/creating-a-self-signed-certificate-for-identity-provider/">Creating a Self-Signed Certificate for Identity Provider</a>
212218
</li>
@@ -223,10 +229,6 @@ <h1>Recent Posts</h1>
223229
<a href="/blog/2016/07/09/a-blog-is-reborn/">A Blog Is Reborn</a>
224230
</li>
225231

226-
<li class="post">
227-
<a href="/blog/2015/01/07/tfvc-and-nuget-updates/">TFVC and NuGet Updates</a>
228-
</li>
229-
230232
</ul>
231233
</section>
232234

@@ -241,7 +243,7 @@ <h1>Recent Posts</h1>
241243
</div>
242244
</div>
243245
<footer role="contentinfo"><p>
244-
Copyright &copy; 2017 - Douglas Cameron -
246+
Copyright &copy; 2018 - Douglas Cameron -
245247
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
246248
</p>
247249

0 commit comments

Comments
 (0)