public override void OnActionExecuting(ActionExecutingContext context)
        {
            var host = context.HttpContext.Request.Host;

            if (host.Host == "localhost")
            {
            }
            else if (host.Host == "127.0.0.1")
            {
            }
            else if (host.Host != "jalan.wang")
            {
                host = new Microsoft.AspNetCore.Http.HostString("jalan.wang");
            }

            base.OnActionExecuting(context);
        }
Example #2
0
        public HttpContext(IRoadieSettings configuration, IUrlHelper urlHelper)
        {
            var scheme = urlHelper.ActionContext.HttpContext.Request.Scheme;

            if (configuration.UseSSLBehindProxy)
            {
                scheme = "https";
            }
            var host = urlHelper.ActionContext.HttpContext.Request.Host;

            if (!string.IsNullOrEmpty(configuration.BehindProxyHost))
            {
                host = new Microsoft.AspNetCore.Http.HostString(configuration.BehindProxyHost);
            }
            this.BaseUrl      = $"{ scheme }://{ host }";
            this.ImageBaseUrl = $"{ this.BaseUrl}/images";
        }
 public static void FromAbsolute(string uri, out string scheme, out Microsoft.AspNetCore.Http.HostString host, out Microsoft.AspNetCore.Http.PathString path, out Microsoft.AspNetCore.Http.QueryString query, out Microsoft.AspNetCore.Http.FragmentString fragment)
 {
     throw null;
 }
 public static string BuildAbsolute(string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.PathString path = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.QueryString query = default(Microsoft.AspNetCore.Http.QueryString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString))
 {
     throw null;
 }
 public abstract string GetUriByAddress <TAddress>(TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase            = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions?options = null);