isFileThere will check for the presence of candidate path
(candidate string)
| 533 | |
| 534 | // isFileThere will check for the presence of candidate path |
| 535 | func isFileThere(candidate string) bool { |
| 536 | fi, err := os.Stat(candidate) |
| 537 | if err != nil || fi.IsDir() || !fi.Mode().IsRegular() { |
| 538 | return false |
| 539 | } |
| 540 | return true |
| 541 | } |
| 542 | |
| 543 | // verifyTokenAtEdge checks for a token on disk, or generates a new one. |
| 544 | // Then makes a request to the origin with the token to ensure it is valid. |