Skip to content

Commit fbe83d1

Browse files
Extends support for CORS in CrudApiPlugin to action-level auth (#1199)
1 parent 9ad2b48 commit fbe83d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev-proxy-plugins/Mocks/CrudApiPlugin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ private void AddCORSHeaders(Request request, List<HttpHeader> headers)
218218

219219
headers.Add(new HttpHeader("access-control-allow-origin", origin));
220220

221-
if (_configuration.EntraAuthConfig is not null)
221+
if (_configuration.EntraAuthConfig is not null ||
222+
_configuration.Actions.Any(a => a.Auth == CrudApiAuthType.Entra))
222223
{
223224
headers.Add(new HttpHeader("access-control-allow-headers", "authorization"));
224225
}

0 commit comments

Comments
 (0)