fix: show error on cloudflare antibot page
This commit is contained in:
parent
4926480a7e
commit
b97a09da37
10
lyrics.go
10
lyrics.go
@ -145,6 +145,16 @@ func lyricsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cf := doc.Find(".cloudflare_content").Length()
|
||||||
|
if cf > 0 {
|
||||||
|
logger.Errorln("cloudflare got in the way")
|
||||||
|
render("error", w, map[string]string{
|
||||||
|
"Status": "500",
|
||||||
|
"Error": "damn cloudflare, issue #21 on GitHub",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var s song
|
var s song
|
||||||
s.parse(doc)
|
s.parse(doc)
|
||||||
|
|
||||||
|
@ -245,6 +245,7 @@ footer a:hover {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
color: #222;
|
color: #222;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user