Skip to content

Commit 2b3a0a8

Browse files
committed
Adds CORS policy for Tableau domain
1 parent cf2eb7e commit 2b3a0a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

DigitalLearningSolutions.Web/Startup.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,18 @@ public void ConfigureServices(IServiceCollection services)
205205
RegisterHelpers(services);
206206
RegisterHttpClients(services);
207207
RegisterWebServiceFilters(services);
208+
209+
// Add CORS policy for tableau
210+
services.AddCors(options =>
211+
{
212+
options.AddPolicy("SecurePolicy", builder =>
213+
{
214+
builder.WithOrigins("https://qa.telemetry.tableausoftware.com")
215+
.WithMethods("GET", "OPTIONS")
216+
.WithHeaders("Authorization", "Content-Type")
217+
.AllowCredentials();
218+
});
219+
});
208220
}
209221

210222
private void SetUpAuthentication(IServiceCollection services)

0 commit comments

Comments
 (0)