Skip to content

Commit 4df46f2

Browse files
committed
fix: reallow direct browser-requests when in dev-stage as used by demos
1 parent 389e5cf commit 4df46f2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI

VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@
172172
{
173173
app.UseSwagger();
174174
app.UseSwaggerUI();
175+
176+
// Direct cors requests used in dev-stages
177+
app.UseCors(builder => builder
178+
.AllowAnyOrigin()
179+
.AllowAnyMethod()
180+
.AllowAnyHeader());
175181
}
176182

177183
app.UseSerilogRequestLogging(options =>

0 commit comments

Comments
 (0)