File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/Microsoft.AspNetCore.SpaServices/Prerendering Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
- using Microsoft . AspNetCore . SpaServices . Prerendering ;
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Text ;
4
+ using Microsoft . AspNetCore . Http ;
5
+ using Microsoft . AspNetCore . NodeServices ;
6
+ using Microsoft . AspNetCore . SpaServices . Prerendering ;
7
+ using Microsoft . Extensions . DependencyInjection . Extensions ;
2
8
3
9
namespace Microsoft . Extensions . DependencyInjection
4
10
{
@@ -14,7 +20,7 @@ public static class PrerenderingServiceCollectionExtensions
14
20
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
15
21
public static void AddSpaPrerenderer ( this IServiceCollection serviceCollection )
16
22
{
17
- serviceCollection . AddHttpContextAccessor ( ) ;
23
+ serviceCollection . TryAddSingleton < IHttpContextAccessor , HttpContextAccessor > ( ) ;
18
24
serviceCollection . AddSingleton < ISpaPrerenderer , DefaultSpaPrerenderer > ( ) ;
19
25
}
20
26
}
You can’t perform that action at this time.
0 commit comments