Skip to content

Commit 9821093

Browse files
Reverted the CORS policy code for moodle
1 parent 2a15198 commit 9821093

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

Auth/LearningHub.Nhs.Auth/Program.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
string corsOriginUrl = builder.Configuration.GetValue<string>("LearningHubAuthConfig:AuthClients:learninghubopenapi:BaseUrl");
2727

28-
string corsMoodleUrl = builder.Configuration.GetValue<string>("MoodleAPIConfig:BaseUrl");
29-
3028
builder.Services.AddCors(options =>
3129
{
3230
options.AddPolicy(
@@ -36,17 +34,6 @@
3634
.AllowAnyHeader());
3735
});
3836

39-
builder.Services.AddCors(options =>
40-
{
41-
options.AddPolicy("MoodleCORS", builder =>
42-
{
43-
builder.WithOrigins(corsMoodleUrl)
44-
.AllowAnyHeader()
45-
.AllowAnyMethod()
46-
.AllowCredentials();
47-
});
48-
});
49-
5037
builder.Services.ConfigureServices(builder.Configuration, builder.Environment);
5138

5239
GlobalDiagnosticsContext.Set("connectionString", builder.Configuration.GetSection("ASPNETCORE_ConnectionStrings")["NLogDb"]);
@@ -85,8 +72,6 @@
8572

8673
app.UseCors("CorsPolicy");
8774

88-
app.UseCors("MoodleCORS");
89-
9075
app.UseCookiePolicy();
9176

9277
app.UseHttpsRedirection();

0 commit comments

Comments
 (0)