Commit 145ecaa 1 parent 7c89255 commit 145ecaa Copy full SHA for 145ecaa
File tree 2 files changed +21
-2
lines changed
MiniSpace.Services.Students/src/MiniSpace.Services.Students.Infrastructure
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ public static IParalaxBuilder AddInfrastructure(this IParalaxBuilder builder)
90
90
. AddMongoRepository < UserProfileViewsDocument , Guid > ( "user_profile_views" )
91
91
. AddMongoRepository < UserViewingProfilesDocument , Guid > ( "user_viewing_profiles" )
92
92
. AddMongoRepository < BlockedUsersDocument , Guid > ( "blocked_users" )
93
+ . AddSignalRInfrastructure ( )
93
94
. AddWebApiSwaggerDocs ( )
94
95
. AddCertificateAuthentication ( )
95
96
. AddSecurity ( ) ;
@@ -131,6 +132,23 @@ public static IApplicationBuilder UseInfrastructure(this IApplicationBuilder app
131
132
132
133
return app ;
133
134
}
135
+
136
+ public static IParalaxBuilder AddSignalRInfrastructure ( this IParalaxBuilder builder )
137
+ {
138
+ builder . Services . AddCors ( options =>
139
+ {
140
+ options . AddPolicy ( "CorsPolicy" ,
141
+ builder => builder
142
+ . AllowAnyMethod ( )
143
+ . AllowAnyHeader ( )
144
+ . AllowCredentials ( )
145
+ . SetIsOriginAllowed ( ( host ) => true ) ) ;
146
+ } ) ;
147
+
148
+ builder . Services . AddSignalR ( ) ;
149
+
150
+ return builder ;
151
+ }
134
152
135
153
internal static CorrelationContext GetCorrelationContext ( this IHttpContextAccessor accessor )
136
154
=> accessor . HttpContext ? . Request . Headers . TryGetValue ( "Correlation-Context" , out var json ) is true
Original file line number Diff line number Diff line change 7
7
</PropertyGroup >
8
8
9
9
<ItemGroup >
10
+ <PackageReference Include =" Microsoft.AspNetCore.SignalR" Version =" 1.2.0" />
10
11
<PackageReference Include =" Paralax" Version =" *" />
11
12
<PackageReference Include =" Paralax.Auth" Version =" *" />
12
13
<PackageReference Include =" Paralax.CQRS.Queries" Version =" *" />
33
34
</ItemGroup >
34
35
35
36
<ItemGroup >
36
- <PackageReference Include =" Microsoft.Extensions.Hosting.Abstractions" Version =" 8 .0.0" />
37
- <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 8 .0.0" />
37
+ <PackageReference Include =" Microsoft.Extensions.Hosting.Abstractions" Version =" 9 .0.0" />
38
+ <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 9 .0.0" />
38
39
</ItemGroup >
39
40
40
41
<ItemGroup >
You can’t perform that action at this time.
0 commit comments