8000 feat: tracing improvements by deansheather · Pull Request #4988 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: tracing improvements #4988

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

Merged
merged 5 commits into from
Nov 28, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
fixup! feat: move tracing middleware higher up the middleware stack
  • Loading branch information
deansheather committed Nov 23, 2022
commit 343e27d16229e2ae0b20bb3c702ab1bebd0b7b88
36 changes: 36 additions & 0 deletions coderd/httpmw/patternmatcher/routepatterns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ func Test_RoutePatterns(t *testing.T) {
},
output: "^(/api/?)$",
},
{
name: "TrailingSlash",
patterns: []string{
"/api/",
},
output: "^(/api/)$",
},
{
name: "Multiple",
patterns: []string{
Expand Down Expand Up @@ -62,6 +69,35 @@ func Test_RoutePatterns(t *testing.T) {
},
output: "^(/api/?|/api/.+/?|/@[^/]+/[^/]+/apps/.+/?|/%40[^/]+/[^/]+/apps/.+/?|/gitauth/[^/]+/callback/?)$",
},
{
name: "Slash",
patterns: []string{
"/",
},
output: "^(/)$",
},
{
name: "SlashStar",
patterns: []string{
"/*",
},
output: "^(/[^/]+/?)$",
},
{
name: "SlashStarStar",
patterns: []string{
"/**",
},
output: "^(/.+/?)$",
},
{
name: "SlashSlash",
patterns: []string{
"//",
"/api//v1",
},
outp 4A04 ut: "^(//|/api//v1/?)$",
},
{
name: "Invalid",
patterns: []string{
Expand Down
0