File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,11 @@ fn get_default_middleware_matcher(
53
53
if skip_internal {
54
54
if let Some ( base_path) = base_path {
55
55
// Escape special regex characters in basePath inline
56
- let escaped_base_path: String = base_path. chars ( )
56
+ let escaped_base_path: String = base_path
57
+ . chars ( )
57
58
. map ( |c| match c {
58
- '.' | '*' | '+' | '?' | '^' | '$' | '{' | '}' | '(' | ')' | '|' | '[' | ']' | '\\' => {
59
+ '.' | '*' | '+' | '?' | '^' | '$' | '{' | '}' | '(' | ')' | '|' | '[' | ']'
60
+ | '\\' => {
59
61
format ! ( "\\ {}" , c)
60
62
}
61
63
_ => c. to_string ( ) ,
@@ -206,7 +208,8 @@ impl MiddlewareEndpoint {
206
208
. map ( |i18n| i18n. locales . len ( ) > 1 )
207
209
. unwrap_or ( false ) ;
208
210
let base_path = next_config. base_path ( ) . await ?;
209
- let skip_middleware_next_internal_routes = next_config. skip_middleware_next_internal_routes ( ) . await ?;
211
+ let skip_middleware_next_internal_routes =
212
+ next_config. skip_middleware_next_internal_routes ( ) . await ?;
210
213
211
214
let matchers = if let Some ( matchers) = config. middleware_matcher . as_ref ( ) {
212
215
matchers
You can’t perform that action at this time.
0 commit comments