INNER CODE UNIT · Go

checkDuplicateRequestPath

prometheus-msteams/prometheus-msteams · cmd/server/main.go:494

func checkDuplicateRequestPath(routes []transport.Route) error {
	added := map[string]bool{}
	for _, r := range routes {
		if _, ok := added[r.RequestPath]; ok {
			return fmt.Errorf("found duplicate use of request path '%s'", r.RequestPath)
		}
		added[r.RequestPath] = true
	}
	return nil
}

const bearerType = "webhook"

func extractWebhookFromRequest(request *http.Request, requestPathPrefix string) (string, error) {
	var pathAndQuery string

	// Query contains mandatory "api-version" for "worflow"
	if len(request.URL.Query()) > 0 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…