Skip to content

Commit

Permalink
Better attempt to fix Google phishing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jul 9, 2018
1 parent 3846883 commit 29132f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions interfacer/src/browsh/raw_text_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand All @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion webext/manifest.json
Original file line number Diff line number Diff line change
@@ -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",

Expand Down

0 comments on commit 29132f3

Please sign in to comment.