feat: output a token when generating a token for the header

This commit is contained in:
Polianin Nikita 2024-10-07 02:16:20 +03:00
parent 1c981fb7bf
commit 2b89dd07a9

View File

@ -84,6 +84,7 @@ public class Program
{ {
secretForward.SecretForwardToken = GeneratorKey.GenerateAlphaNumeric(16); secretForward.SecretForwardToken = GeneratorKey.GenerateAlphaNumeric(16);
secretForward.SaveSetting(); secretForward.SaveSetting();
Console.WriteLine($"For the reverse proxy server to work correctly, use the header: '{secretForward.SecretForwardToken}-X-Forwarded-For'");
} }
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;