Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Apr 26, 2024
1 parent 3ef75b6 commit 1bd6785
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions bff/server/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public ActionResult Login(string? returnUrl, string? claimsChallenge)

if (claimsChallenge != null)
{
string jsonString = claimsChallenge.Replace("\\", "")
.Trim(new char[1] { '"' });
string jsonString = claimsChallenge.Replace("\\", "").Trim('"');

properties.Items["claims"] = jsonString;
}
Expand Down
2 changes: 1 addition & 1 deletion bff/server/Pages/Error.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@model BffOpenIddict.Server.Pages.ErrorModel

<!DOCTYPE html>
<html>
<html lang="en">

<head>
<meta charset="utf-8" />
Expand Down
1 change: 0 additions & 1 deletion bff/server/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace BffOpenIddict.Server.Pages;

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
public string? RequestId { get; set; }
Expand Down
6 changes: 1 addition & 5 deletions bff/server/SecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ public static class SecurityHeadersDefinitions
{
public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, string? idpHost)
{
if(idpHost == null)
{
throw new ArgumentNullException(nameof(idpHost));
}
ArgumentNullException.ThrowIfNull(idpHost);

var policy = new HeaderPolicyCollection()
.AddFrameOptionsDeny()
Expand All @@ -34,7 +31,6 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin
{
builder.AddStyleSrc().WithNonce().UnsafeInline();
}


builder.AddScriptSrc().WithNonce().UnsafeInline();
})
Expand Down

0 comments on commit 1bd6785

Please sign in to comment.