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
.UseOptionsVerbHandler()// Options verb handler must be added after CORS. See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#cross-origin-resource-sharing-cors-and-preflight-requests
155
-
.UseSwaggerWithOptions();// Check out Configuration/MiddlewareConfig.cs/UseSwaggerWithOptions to do actual configuration. See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#documenting-api
150
+
.AllowAnyHeader()
151
+
.AllowAnyOrigin()// <-- Comment this line out and uncomment two lines below to use with SignalR
152
+
/*.AllowCredentials()
153
+
.SetIsOriginAllowed(origin => true)*/
154
+
);
155
+
156
+
app.UseOptionsVerbHandler()// Options verb handler must be added after CORS. See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#cross-origin-resource-sharing-cors-and-preflight-requests
157
+
.UseSwaggerWithOptions();// Check out Configuration/MiddlewareConfig.cs/UseSwaggerWithOptions to do actual configuration. See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#documenting-api
0 commit comments