(targetURL *neturl.URL)
| 57 | } |
| 58 | |
| 59 | func localCaptchaURLForTarget(targetURL *neturl.URL) string { |
| 60 | localURL := &neturl.URL{ |
| 61 | Scheme: "http", |
| 62 | Host: "localhost:" + captchaListenPort, |
| 63 | Path: targetURL.Path, |
| 64 | RawPath: targetURL.RawPath, |
| 65 | RawQuery: targetURL.RawQuery, |
| 66 | } |
| 67 | if localURL.Path == "" { |
| 68 | localURL.Path = "/" |
| 69 | } |
| 70 | return localURL.String() |
| 71 | } |
| 72 | |
| 73 | func targetOrigin(targetURL *neturl.URL) string { |
| 74 | return targetURL.Scheme + "://" + targetURL.Host |
no outgoing calls
no test coverage detected