//Return index.html for unmatched requests so routing is handled on client public object Any(FallbackForClientRoutes request) { return(Request.PathInfo == "/" ? Request.GetPageResult("/static") : Request.PathInfo.StartsWith("/p/") ? Request.GetPageResult("/static-post") : new HttpResult(VirtualFileSources.GetFile("index.html"))); }
public object Any(FallbackForClientRoutes request) { var path = (request.PathInfo ?? "").Trim('/'); if (ShowServerHtml()) { return path == "" ? new HttpResult(base.Gateway.Send(new Overview())) { View = "Home" } } : new HttpResult(base.Gateway.Send(new GetTechnologyStack { Slug = request.PathInfo })) { View = "Stack" }; return(AngularJsApp()); }
//Return index.html for unmatched requests so routing is handled on client public object Any(FallbackForClientRoutes request) => new PageResult(Request.GetPage("/"));