Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set default strip_path to true #999

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions convert/testdata/5/output-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
tags:
- team-svc1
write_timeout: 60000
Expand All @@ -41,7 +41,7 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 60000
- connect_timeout: 60000
host: mockbin.org
Expand All @@ -61,5 +61,5 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 60000
6 changes: 3 additions & 3 deletions convert/testdata/6/output-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
protocols:
- https
regex_priority: 0
strip_path: false
strip_path: true
tags:
- team-svc1
write_timeout: 30000
Expand All @@ -39,7 +39,7 @@ services:
protocols:
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 30000
- connect_timeout: 30000
host: mockbin.org
Expand All @@ -58,5 +58,5 @@ services:
protocols:
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 30000
6 changes: 3 additions & 3 deletions convert/testdata/7/output-expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
tags:
- team-svc1
write_timeout: 60000
Expand All @@ -41,7 +41,7 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 60000
- connect_timeout: 60000
host: mockbin.org
Expand All @@ -61,5 +61,5 @@ services:
- http
- https
regex_priority: 0
strip_path: false
strip_path: true
write_timeout: 60000
2 changes: 1 addition & 1 deletion utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
routeDefaults = kong.Route{
PreserveHost: kong.Bool(false),
RegexPriority: kong.Int(0),
StripPath: kong.Bool(false),
StripPath: kong.Bool(true),
Protocols: kong.StringSlice("http", "https"),
}
targetDefaults = kong.Target{
Expand Down
8 changes: 4 additions & 4 deletions utils/defaulter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func TestRouteSetTest(t *testing.T) {
want: &kong.Route{
PreserveHost: kong.Bool(true),
RegexPriority: kong.Int(0),
StripPath: kong.Bool(false),
StripPath: kong.Bool(true),
Protocols: kong.StringSlice("http", "https"),
},
},
Expand All @@ -192,7 +192,7 @@ func TestRouteSetTest(t *testing.T) {
want: &kong.Route{
PreserveHost: kong.Bool(false),
RegexPriority: kong.Int(0),
StripPath: kong.Bool(false),
StripPath: kong.Bool(true),
Protocols: kong.StringSlice("http", "tls"),
},
},
Expand All @@ -202,15 +202,15 @@ func TestRouteSetTest(t *testing.T) {
Name: kong.String("foo"),
Hosts: kong.StringSlice("1.example.com", "2.example.com"),
Methods: kong.StringSlice("GET", "POST"),
StripPath: kong.Bool(false),
StripPath: kong.Bool(true),
},
want: &kong.Route{
Name: kong.String("foo"),
Hosts: kong.StringSlice("1.example.com", "2.example.com"),
Methods: kong.StringSlice("GET", "POST"),
PreserveHost: kong.Bool(false),
RegexPriority: kong.Int(0),
StripPath: kong.Bool(false),
StripPath: kong.Bool(true),
Protocols: kong.StringSlice("http", "https"),
},
},
Expand Down
Loading