mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 04:48:17 +08:00
* added failing acceptance test * added validation for double slash in upstream and downstream path templates
This commit is contained in:
@ -19,6 +19,14 @@ namespace Ocelot.Configuration.Validator
|
||||
.Must(path => path.StartsWith("/"))
|
||||
.WithMessage("{PropertyName} {PropertyValue} doesnt start with forward slash");
|
||||
|
||||
RuleFor(reRoute => reRoute.UpstreamPathTemplate)
|
||||
.Must(path => !path.Contains("//"))
|
||||
.WithMessage("{PropertyName} {PropertyValue} contains double forward slash, Ocelot does not support this at the moment. Please raise an issue in GitHib if you need this feature.");
|
||||
|
||||
RuleFor(reRoute => reRoute.DownstreamPathTemplate)
|
||||
.Must(path => !path.Contains("//"))
|
||||
.WithMessage("{PropertyName} {PropertyValue} contains double forward slash, Ocelot does not support this at the moment. Please raise an issue in GitHib if you need this feature.");
|
||||
|
||||
RuleFor(reRoute => reRoute.UpstreamPathTemplate)
|
||||
.Must(path => path.StartsWith("/"))
|
||||
.WithMessage("{PropertyName} {PropertyValue} doesnt start with forward slash");
|
||||
|
Reference in New Issue
Block a user