mirror of
https://github.com/sphildreth/roadie
synced 2024-11-12 23:47:07 +00:00
17 lines
No EOL
517 B
C#
17 lines
No EOL
517 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Roadie.Library.Utility;
|
|
|
|
namespace Roadie.Api.Services
|
|
{
|
|
public class HttpContext : IHttpContext
|
|
{
|
|
public string BaseUrl { get; set; }
|
|
public string ImageBaseUrl { get; set; }
|
|
|
|
public HttpContext(IUrlHelper urlHelper)
|
|
{
|
|
this.BaseUrl = $"{ urlHelper.ActionContext.HttpContext.Request.Scheme}://{ urlHelper.ActionContext.HttpContext.Request.Host }";
|
|
this.ImageBaseUrl = $"{ this.BaseUrl}/images";
|
|
}
|
|
}
|
|
} |