gin icon indicating copy to clipboard operation
gin copied to clipboard

Logger skip paths allow params

Open hanyucui opened this issue 2 years ago • 3 comments

This change adds support for skip paths with params, e.g., "/user/:id". This is more flexible and the implementation is simply comparing Context.FullPath() rather than Context.Request.URL.Path against skip paths.

The only case where it would lead to regression is where legacy code uses hardcoded paths for parameterized paths. E.g., when hardcoded paths like "/user/1" and "/user/2" are added to skipped paths for "/user/:id". Although legal, I cannot imagine when such a case would be useful. Hence I think regression would be extremely rare in practice.

This change also updates relevant tests.

hanyucui avatar May 06 '22 05:05 hanyucui

@appleboy @thinkerou Please take a look. Thanks in advance!

hanyucui avatar May 17 '22 05:05 hanyucui

@appleboy @thinkerou Please take a look. Thanks in advance!

hanyucui avatar Jul 12 '22 23:07 hanyucui

Change milestone to v1.10

appleboy avatar Feb 14 '23 03:02 appleboy