Better attempt to fix Google phishing warnings

pull/69/head v1.2.2
Thomas Buckley-Houston 2018-07-09 13:51:58 +08:00
rodzic 384688302e
commit 29132f3695
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -83,6 +83,10 @@ func handleHTTPServerRequest(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Cache-Control", "public, max-age=600")
if (strings.Contains(urlForBrowsh, "mail.google.com")) {
http.Redirect(w, r, "/", 301)
return
}
if strings.TrimSpace(urlForBrowsh) == "" {
if (strings.Contains(r.Host, "text.")) {
message = "Welcome to the Browsh plain text client.\n" +
@ -91,10 +95,6 @@ func handleHTTPServerRequest(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, message)
return
}
if (strings.Contains(r.Host, "mail.google.com")) {
http.Redirect(w, r, "https://html.brow.sh", 301)
return
}
urlForBrowsh = "https://www.brow.sh/html-service-welcome"
}
if urlForBrowsh == "robots.txt" {

Wyświetl plik

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Browsh",
"version": "1.2.1",
"version": "1.2.2",
"description": "Renders the browser as realtime, interactive, TTY-compatible text",