We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31d9cf commit 9570f39Copy full SHA for 9570f39
1 file changed
src/MADE.Web/Extensions/HttpContextExtensions.cs
@@ -0,0 +1,23 @@
1
+// MADE Apps licenses this file to you under the MIT license.
2
+// See the LICENSE file in the project root for more information.
3
+
4
+namespace MADE.Web.Extensions
5
+{
6
+ using Microsoft.AspNetCore.Http;
7
8
+ /// <summary>
9
+ /// Defines a collection of extensions for a <see cref="HttpContext" /> object.
10
+ /// </summary>
11
+ public static class HttpContextExtensions
12
+ {
13
14
+ /// Gets the domain name of the requesting context.
15
16
+ /// <param name="context">The requesting <see cref="HttpContext"/>.</param>
17
+ /// <returns>The domain part of the request's host.</returns>
18
+ public static string GetDomain(this HttpContext context)
19
20
+ return context.Request.Host.Host;
21
+ }
22
23
+}
0 commit comments