use TrimPrefix instead of TrimLeft
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
04fbfaeb6c
commit
4f5d2dfdb8
|
|
@ -71,7 +71,7 @@ func IndexReceiverWebhookPath(o client.Object) []string {
|
||||||
func (s *ReceiverServer) handlePayload() func(w http.ResponseWriter, r *http.Request) {
|
func (s *ReceiverServer) handlePayload() func(w http.ResponseWriter, r *http.Request) {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
digest := url.PathEscape(strings.TrimLeft(r.RequestURI, apiv1.ReceiverWebhookPath))
|
digest := url.PathEscape(strings.TrimPrefix(r.RequestURI, apiv1.ReceiverWebhookPath))
|
||||||
|
|
||||||
s.logger.Info(fmt.Sprintf("handling request: %s", digest))
|
s.logger.Info(fmt.Sprintf("handling request: %s", digest))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue