Restrict cookie vendor to self host using attribute

This commit is contained in:
Derek Nance
2026-01-29 13:31:46 -06:00
parent ebda84a6e9
commit 1dd81fa636

View File

@@ -1,4 +1,5 @@
using Bit.Core.Settings; using Bit.Core.Settings;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@@ -10,6 +11,7 @@ namespace Bit.Api.Controllers;
/// requests to this endpoint do not have the auth cookie stripped. /// requests to this endpoint do not have the auth cookie stripped.
/// </summary> /// </summary>
[Route("sso-cookie-vendor")] [Route("sso-cookie-vendor")]
[SelfHosted(SelfHostedOnly = true)]
public class SsoCookieVendorController(IGlobalSettings globalSettings) : Controller public class SsoCookieVendorController(IGlobalSettings globalSettings) : Controller
{ {
private readonly IGlobalSettings _globalSettings = globalSettings; private readonly IGlobalSettings _globalSettings = globalSettings;