Skip to content

Commit

Permalink
Merge pull request #16 from eko/removed-break-auth
Browse files Browse the repository at this point in the history
Removed app kill depending on auth status code (fixes #15)
  • Loading branch information
eko committed Oct 2, 2019
2 parents d72e73c + f556b22 commit c84484e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions internal/pihole/client.go
Expand Up @@ -7,7 +7,6 @@ import (
"log"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -119,11 +118,6 @@ func (c *Client) getPHPSessionID() (sessionID string) {
log.Printf("An error has occured during login to PI-Hole: %v", err)
}

if resp.StatusCode != http.StatusOK {
log.Printf("Unable to login to PI-Hole, got a HTTP status code response '%d' instead of '%d'", resp.StatusCode, http.StatusFound)
os.Exit(1)
}

for _, cookie := range resp.Cookies() {
if cookie.Name == "PHPSESSID" {
sessionID = cookie.Value
Expand Down

0 comments on commit c84484e

Please sign in to comment.