Skip to content

Commit a2deed7

Browse files
committed
cors tweaks
1 parent 02be152 commit a2deed7

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

rubberduckvba.Server/Api/Admin/AdminController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public IActionResult ClearCache()
4646
}
4747

4848
#if DEBUG
49+
[EnableCors("CorsPolicy")]
4950
[HttpGet("admin/config/current")]
5051
public IActionResult Config()
5152
{

rubberduckvba.Server/Api/Auth/AuthController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public AuthController(IOptions<GitHubSettings> configuration, IOptions<ApiSettin
3737
}
3838

3939
[HttpGet("auth")]
40+
[EnableCors("CorsPolicy")]
4041
[AllowAnonymous]
4142
public IActionResult Index()
4243
{

rubberduckvba.Server/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public static void Main(string[] args)
5151
{
5252
policy
5353
.SetIsOriginAllowed(origin => true)
54-
.AllowAnyOrigin()
5554
.AllowAnyHeader()
5655
.WithMethods("OPTIONS", "GET", "POST")
5756
.AllowCredentials()

0 commit comments

Comments
 (0)