MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / getAppURL

Function getAppURL

cmd/cloudflared/access/cmd.go:467–480  ·  view source on GitHub ↗

getAppURL will pull the request URL needed for fetching a user's Access token

(cmdArgs []string, log *zerolog.Logger)

Source from the content-addressed store, hash-verified

465
466// getAppURL will pull the request URL needed for fetching a user's Access token
467func getAppURL(cmdArgs []string, log *zerolog.Logger) (*url.URL, error) {
468 if len(cmdArgs) < 1 {
469 log.Error().Msg("Please provide a valid URL as the first argument to curl.")
470 return nil, errors.New("not a valid url")
471 }
472
473 u, err := processURL(cmdArgs[0])
474 if err != nil {
475 log.Error().Msg("Please provide a valid URL as the first argument to curl.")
476 return nil, err
477 }
478
479 return u, err
480}
481
482// parseAllowRequest will parse cmdArgs and return a copy of the args and result
483// of the allow request was present

Callers 1

curlFunction · 0.85

Calls 2

processURLFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected