Skip to content

Commit

Permalink
Ensure fixed rules are evaluated last (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
haga-rak authored Feb 2, 2025
1 parent 63eb78d commit d5e9583
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/Fluxzy.Core/Core/ProxyRuntimeSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using Fluxzy.Clients;
using Fluxzy.Rules;
Expand Down Expand Up @@ -114,8 +113,9 @@ public ProxyRuntimeSetting(

public void Init()
{
var activeRules = StartupSetting.FixedRules()
.Concat(StartupSetting.AlterationRules).ToList();
var activeRules = StartupSetting.AlterationRules
.Concat(StartupSetting.FixedRules())
.ToList();

var startupContext = new StartupContext(StartupSetting, VariableContext, ArchiveWriter);

Expand Down Expand Up @@ -164,17 +164,4 @@ await rule.Enforce(context, exchange, connection, filterScope,
return context;
}
}

internal class HostInfo
{
public HostInfo(string host)
{
Host = host;
EncodedHost = Encoding.UTF8.GetBytes(host);
}

public string Host { get; }

public byte[] EncodedHost { get; set; }
}
}

0 comments on commit d5e9583

Please sign in to comment.