diff options
author | crupest <crupest@outlook.com> | 2022-11-21 12:26:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-21 12:26:12 +0800 |
commit | 12aa97c52b3c801139652ba6f93d65996d0b3a38 (patch) | |
tree | 4236f6850acaf22db55b02c20660b81dd5e9294e /BackEnd/Timeline/Startup.cs | |
parent | df53f19245e0957fff1e1e01573c3fcfcf53d8b8 (diff) | |
download | timeline-12aa97c52b3c801139652ba6f93d65996d0b3a38.tar.gz timeline-12aa97c52b3c801139652ba6f93d65996d0b3a38.tar.bz2 timeline-12aa97c52b3c801139652ba6f93d65996d0b3a38.zip |
Add more logs.
Diffstat (limited to 'BackEnd/Timeline/Startup.cs')
-rw-r--r-- | BackEnd/Timeline/Startup.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Startup.cs b/BackEnd/Timeline/Startup.cs index fa4968d7..73bcfa0c 100644 --- a/BackEnd/Timeline/Startup.cs +++ b/BackEnd/Timeline/Startup.cs @@ -59,6 +59,24 @@ namespace Timeline _enableForwardedHeaders = ApplicationConfiguration.GetBoolConfig(configuration, ApplicationConfiguration.EnableForwardedHeadersKey, false);
_forwardedHeadersAllowedProxyHosts = Configuration.GetValue<string?>(ApplicationConfiguration.ForwardedHeadersAllowedProxyHostsKey);
+
+ if (_enableForwardedHeaders)
+ {
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("Forwarded headers enabled.");
+ Console.ResetColor();
+
+ Console.ForegroundColor = ConsoleColor.Yellow;
+ if (_forwardedHeadersAllowedProxyHosts is not null)
+ {
+ Console.WriteLine("Allowed proxy hosts: {0}", _forwardedHeadersAllowedProxyHosts);
+ }
+ else
+ {
+ Console.WriteLine("Allowed proxy hosts settings is default");
+ }
+ Console.ResetColor();
+ }
}
public IWebHostEnvironment Environment { get; }
|