We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a3adef commit fdb83aeCopy full SHA for fdb83ae
LearningHub.Nhs.WebUI/Program.cs
@@ -36,12 +36,14 @@
36
builder.Host.UseNLog();
37
38
string corsMoodleUrl = builder.Configuration.GetValue<string>("MoodleAPIConfig:BaseUrl");
39
+ Uri moodleUri = new Uri(corsMoodleUrl);
40
+ string moodleBaseUrl = $"{moodleUri.Scheme}://{moodleUri.Host}";
41
42
builder.Services.AddCors(options =>
43
{
44
options.AddPolicy("MoodleCORS", builder =>
45
- builder.WithOrigins(corsMoodleUrl)
46
+ builder.WithOrigins(moodleBaseUrl)
47
.AllowAnyHeader()
48
.AllowAnyMethod()
49
.AllowCredentials();
0 commit comments