mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Implemented check for header auth enabled also in backend
This commit is contained in:
parent
5ddda3c39e
commit
df2092d5e3
1 changed files with 1 additions and 5 deletions
|
@ -283,13 +283,9 @@ namespace Ombi.Controllers.V1
|
||||||
{
|
{
|
||||||
string username = null;
|
string username = null;
|
||||||
|
|
||||||
// Check if Header Auth is enabled and Proxy IP is trusted
|
|
||||||
// TODO
|
|
||||||
// var ombiSettings = await repo.GetSettingsAsync();
|
|
||||||
// END TODO
|
|
||||||
var authSettings = await _authSettings.GetSettingsAsync();
|
var authSettings = await _authSettings.GetSettingsAsync();
|
||||||
_log.LogInformation("Logging with header: " + authSettings.HeaderAuthVariable);
|
_log.LogInformation("Logging with header: " + authSettings.HeaderAuthVariable);
|
||||||
if (authSettings.HeaderAuthVariable != null)
|
if (authSettings.HeaderAuthVariable != null && authSettings.EnableHeaderAuth)
|
||||||
{
|
{
|
||||||
if (Request.HttpContext?.Request?.Headers != null && Request.HttpContext.Request.Headers.ContainsKey(authSettings.HeaderAuthVariable))
|
if (Request.HttpContext?.Request?.Headers != null && Request.HttpContext.Request.Headers.ContainsKey(authSettings.HeaderAuthVariable))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue