Moved the application url to HostingEnvironment and set it in the request middleware

This commit is contained in:
Bjarke Berg
2021-02-08 11:00:15 +01:00
parent cf81f9b706
commit fea86bbf7a
26 changed files with 168 additions and 86 deletions

View File

@@ -31,6 +31,11 @@ namespace Umbraco.Core.Hosting
/// </summary>
bool IsHosted { get; }
/// <summary>
/// Gets the main application url.
/// </summary>
Uri ApplicationMainUrl { get; }
/// <summary>
/// Maps a virtual path to a physical path to the application's web root
/// </summary>
@@ -61,5 +66,10 @@ namespace Umbraco.Core.Hosting
/// If virtualPath does not start with ~/ or /
/// </exception>
string ToAbsolute(string virtualPath);
/// <summary>
/// Ensures that the application know its main Url.
/// </summary>
void EnsureApplicationMainUrl(Uri currentApplicationUrl);
}
}