You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
/// <param name="entryPoint">The path, relative to your application root, of the JavaScript file containing prerendering logic.</param>
27
31
/// <param name="buildOnDemand">Optional. If specified, executes the supplied <see cref="ISpaPrerendererBuilder"/> before looking for the <paramref name="entryPoint"/> file. This is only intended to be used during development.</param>
32
+
/// <param name="excludeUrls">Optional. If specified, requests within these URL paths will bypass the prerenderer.</param>
28
33
publicstaticvoidUseSpaPrerendering(
29
34
thisIApplicationBuilderappBuilder,
30
35
stringentryPoint,
31
-
ISpaPrerendererBuilderbuildOnDemand=null)
36
+
ISpaPrerendererBuilderbuildOnDemand=null,
37
+
string[]excludeUrls=null)
32
38
{
33
39
if(string.IsNullOrEmpty(entryPoint))
34
40
{
35
41
thrownewArgumentException("Cannot be null or empty",nameof(entryPoint));
thrownewException($"{nameof(UseSpaPrerendering)} should be called inside the 'configure' callback of a call to {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
42
-
}
43
-
44
-
varurlPrefix=defaultPageMiddleware.UrlPrefix;
45
-
if(urlPrefix==null||urlPrefix.Length<2)
46
-
{
47
-
thrownewArgumentException(
48
-
"If you are using server-side prerendering, the SPA's public path must be "+
49
-
"set to a non-empty and non-root value. This makes it possible to identify "+
50
-
"requests for the SPA's internal static resources, so the prerenderer knows "+
51
-
"not to return prerendered HTML for those requests.",
52
-
nameof(urlPrefix));
53
-
}
54
-
55
44
// We only want to start one build-on-demand task, but it can't commence until
56
45
// a request comes in (because we need to wait for all middleware to be configured)
0 commit comments