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
|
||||
}
|
||||
|
||||
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
|
||||
s.parse(doc)
|
||||
|
||||
|
@ -245,6 +245,7 @@ footer a:hover {
|
||||
text-transform: uppercase;
|
||||
font-size: 1.6rem;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.main {
|
||||
|
Loading…
x
Reference in New Issue
Block a user