++
This commit is contained in:
@@ -7,13 +7,13 @@ namespace zero.Core.Routing
|
||||
{
|
||||
public abstract class AbtractRouteProvider<T> : IRouteProvider<T>
|
||||
{
|
||||
public virtual string Alias { get; }
|
||||
public virtual string Alias { get; protected set; }
|
||||
|
||||
public virtual Type[] AffectedTypes { get; }
|
||||
public virtual Type[] AffectedTypes { get; protected set; }
|
||||
|
||||
public virtual string Controller { get; }
|
||||
public virtual string Controller { get; protected set; }
|
||||
|
||||
public virtual string Action { get; }
|
||||
public virtual string Action { get; protected set; }
|
||||
|
||||
public const string ID_PREFIX = "routes.";
|
||||
|
||||
|
||||
@@ -66,12 +66,10 @@ namespace zero.Web
|
||||
});
|
||||
});
|
||||
|
||||
app.UseWhen(ctx => !ctx.Request.Path.ToString().StartsWith(path), builder =>
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapDynamicControllerRoute<ZeroRoutesTransformer>("/{**url}");
|
||||
});
|
||||
endpoints.MapDynamicControllerRoute<ZeroRoutesTransformer>("{**url}");
|
||||
});
|
||||
|
||||
return app;
|
||||
@@ -104,14 +102,12 @@ namespace zero.Web
|
||||
}
|
||||
|
||||
|
||||
public static IApplicationBuilder UseZeroDevEnvironment(this IApplicationBuilder app, string path = null)
|
||||
public static IApplicationBuilder UseZeroDevEnvironment(this IApplicationBuilder app)
|
||||
{
|
||||
//IZeroOptions options = app.ApplicationServices.GetService<IZeroOptions>();
|
||||
//string zeroPath = options.BackofficePath.EnsureStartsWith('/').TrimEnd('/');
|
||||
|
||||
|
||||
//app.UseDeveloperExceptionPage();
|
||||
|
||||
//string webUiPath = path ?? Path.Combine(Environment.CurrentDirectory, "..", "zero.Web.UI"); // TODO dynPATH
|
||||
|
||||
// map backoffice
|
||||
|
||||
Reference in New Issue
Block a user