gives the CORS header to discovery document
This commit is contained in:
parent
689b1a48c2
commit
30bcb070d9
1 changed files with 4 additions and 1 deletions
|
|
@ -1070,11 +1070,14 @@ public static class HostingExtensions
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
// CORS must run before IdentityServer/Auth middleware so the discovery
|
||||||
|
// document and token endpoints can emit the required
|
||||||
|
// Access-Control-Allow-Origin headers on cross-origin browser fetches.
|
||||||
|
app.UseCors("default");
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseMiddleware<WithdrawnAccountMiddleware>();
|
app.UseMiddleware<WithdrawnAccountMiddleware>();
|
||||||
app.UseIdentityServer();
|
app.UseIdentityServer();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseCors("default");
|
|
||||||
app.MapDefaultControllerRoute();
|
app.MapDefaultControllerRoute();
|
||||||
app.MapStaticAssets(staticAssetsManifestPath);
|
app.MapStaticAssets(staticAssetsManifestPath);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue