mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
[PM-25390] CORS - Password Change URI (#6287)
* enable cors headers for icons program - This is needed now that browsers can hit the change-password-uri path via API call * Add absolute route for change-password-uri
This commit is contained in:
@@ -5,7 +5,7 @@ using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace Bit.Icons.Controllers;
|
||||
|
||||
[Route("change-password-uri")]
|
||||
[Route("~/change-password-uri")]
|
||||
public class ChangePasswordUriController : Controller
|
||||
{
|
||||
private readonly IMemoryCache _memoryCache;
|
||||
|
||||
@@ -92,6 +92,9 @@ public class Startup
|
||||
await next();
|
||||
});
|
||||
|
||||
app.UseCors(policy => policy.SetIsOriginAllowed(o => CoreHelpers.IsCorsOriginAllowed(o, globalSettings))
|
||||
.AllowAnyMethod().AllowAnyHeader().AllowCredentials());
|
||||
|
||||
app.UseRouting();
|
||||
app.UseEndpoints(endpoints => endpoints.MapDefaultControllerRoute());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user