misc
Some checks failed
Dotnet build and test / log-the-inputs (push) Successful in 9s
Dotnet build and test / build (push) Failing after 1m33s

This commit is contained in:
Paul Schneider
2025-07-07 07:49:18 +01:00
parent 15d35e5508
commit e6f8947c08
36 changed files with 328 additions and 146 deletions

View File

@ -13,8 +13,8 @@ namespace Yavsc.Api.Helpers
public static class RequestHelpers
{
// Check for some apache proxy header, if any
public static string ForHost(this HttpRequest request) {
string host = request.Headers["X-Forwarded-For"];
public static string? ForwardedFor(this HttpRequest request) {
string? host = request.Headers["X-Forwarded-For"];
if (string.IsNullOrEmpty(host)) {
host = request.Host.Value;
} else { // Using X-Forwarded-For last address