[按此打開]
[隱藏]
route is using asp.net core middleware pipeline
public class PageMiddleware
=>
async Task Invoke(HttpContext context, IApi api, IApplicationService service)
=>
var response = await PageRouter.InvokeAsync(api, url, siteId);
var page = await api.Pages.GetBySlugAsync<Models.PageInfo>(slug, siteId)
.ConfigureAwait(false);
=> get route information
return new RouteResponse
{
PageId = page.Id,
Route = route,
QueryString = $"id={page.Id}&startpage={isStartPage.ToString().ToLower()}&piranha_handled=true",
IsPublished = page.Published.HasValue && page.Published.Value <= DateTime.Now,
CacheInfo = new HttpCacheInfo
{
EntityTag = Utils.GenerateETag(page.Id.ToString(), lastModified),
LastModified = lastModified
}
as a result, routing "/about"
ends up with /page?id=
$"id={page.Id}&startpage={isStartPage.ToString().ToLower()}&piranha_handled=true"