Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const fix build #451

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion backend/DIAMConfiguration/Controllers/HostsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace DIAMConfiguration.Controllers
public class HostsController : ControllerBase
{
private readonly DIAMConfigurationDataStoreDbContext _context;
private const bool PREFER_REFERER = true;

public HostsController(DIAMConfigurationDataStoreDbContext context)
{
Expand All @@ -23,7 +24,7 @@ public async Task<ActionResult<IEnumerable<LoginOption>>> GetLoginOptions()
{

var request = this.HttpContext.Request;
var hostname = HttpUtils.GetHostFromHeader(request);
var hostname = HttpUtils.GetHostFromHeader(request, PREFER_REFERER);

if (string.IsNullOrEmpty(hostname))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ namespace DIAMConfiguration.Controllers;
[ApiController]
public class PageContentController : ControllerBase
{

const bool PREFER_REFERER = true;
private const bool PREFER_REFERER = true;

private readonly DIAMConfigurationDataStoreDbContext context;
public PageContentController(DIAMConfigurationDataStoreDbContext context)
Expand Down