Skip to content

Commit 8a7af8b

Browse files
1005002: Removed CORS policy as we are using only one origin
1 parent 82d82be commit 8a7af8b

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

GraphQLAdaptor/Grid_GraphQLAdaptor/Program.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@
77
builder.Services.AddRazorComponents()
88
.AddInteractiveServerComponents();
99
builder.Services.AddSyncfusionBlazor();
10-
builder.Services.AddCors(options =>
11-
{
12-
options.AddPolicy("AllowSpecificOrigin", policy =>
13-
{
14-
policy.WithOrigins("http://localhost:5272")
15-
.AllowAnyHeader()
16-
.AllowAnyMethod()
17-
.AllowCredentials();
18-
});
19-
});
2010
// Register GraphQL services.
2111
builder.Services.AddGraphQLServer().AddQueryType<GraphQLQuery>().AddMutationType<GraphQLMutation>();
2212

@@ -31,8 +21,6 @@
3121
}
3222
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
3323
app.UseHttpsRedirection();
34-
// Use CORS
35-
app.UseCors("AllowSpecificOrigin");
3624
app.UseAntiforgery();
3725
app.MapStaticAssets();
3826
app.MapRazorComponents<App>()

0 commit comments

Comments
 (0)