Add option to ignore trailing slashes in requests

This commit is contained in:
GHXX committed 2025-06-02 17:23:35 +02:00
1 parent 6ad805841d
commit d2a3a82b95
2 files changed
+11 -2

No files matched your search

@@ -13,6 +13,10 @@ public class SimpleHttpServerConfiguration {
/// See description of <see cref="DisableLogMessagePrinting"/>
/// </summary>
public CustomLogMessageHandler? LogMessageHandler { get; init; } = null;
/// <summary>
/// If set to true, paths ending with / are identical to paths without said trailing slash. E.g. /index is then the same as /index/
/// </summary>
public bool TrimTrailingSlash { get; init; } = true;
public SimpleHttpServerConfiguration() { }