summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Buckley-Houston <tom@tombh.co.uk>2018-07-09 13:51:58 +0800
committerThomas Buckley-Houston <tom@tombh.co.uk>2018-07-09 13:51:58 +0800
commit29132f36951168e99cb260bd9dee3d56fbbddff2 (patch)
tree77d5c8b8519016064dcac9e5c76b924933d68b5f
parent384688302e86ddc24e3273934f340d0b368f555d (diff)
Better attempt to fix Google phishing warningsv1.2.2
-rw-r--r--interfacer/src/browsh/raw_text_server.go8
-rw-r--r--webext/manifest.json2
2 files changed, 5 insertions, 5 deletions
diff --git a/interfacer/src/browsh/raw_text_server.go b/interfacer/src/browsh/raw_text_server.go
index e2d686a..75ccd12 100644
--- a/interfacer/src/browsh/raw_text_server.go
+++ b/interfacer/src/browsh/raw_text_server.go
@@ -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" {
diff --git a/webext/manifest.json b/webext/manifest.json
index 70b0b62..0683ed3 100644
--- a/webext/manifest.json
+++ b/webext/manifest.json
@@ -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",