Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Changed AddScriptCspHeaders and AddStyleCspHeaders from internal to p… #2260

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/IdentityServer4/Extensions/HttpResponseExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.


Expand Down Expand Up @@ -70,15 +70,15 @@ public static void RedirectToAbsoluteUrl(this HttpResponse response, string url)
response.Redirect(url);
}

internal static void AddScriptCspHeaders(this HttpResponse response, CspOptions options, string hash)
public static void AddScriptCspHeaders(this HttpResponse response, CspOptions options, string hash)
{
var csp1part = options.Level == CspLevel.One ? "'unsafe-inline' " : string.Empty;
var cspHeader = $"default-src 'none'; script-src {csp1part}'{hash}'";

AddCspHeaders(response.Headers, options, cspHeader);
}

internal static void AddStyleCspHeaders(this HttpResponse response, CspOptions options, string hash, string frameSources)
public static void AddStyleCspHeaders(this HttpResponse response, CspOptions options, string hash, string frameSources)
{
var csp1part = options.Level == CspLevel.One ? "'unsafe-inline' " : string.Empty;
var cspHeader = $"default-src 'none'; style-src {csp1part}'{hash}'";
Expand Down