skottie - Site verification that actually works.
Bug: skia:
Change-Id: I43fd612db4a8c8a7dc81c33bfe0240a55f2ce962
Reviewed-on: https://skia-review.googlesource.com/c/183461
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
diff --git a/skottie/go/skottie/main.go b/skottie/go/skottie/main.go
index c75336a..baec180 100644
--- a/skottie/go/skottie/main.go
+++ b/skottie/go/skottie/main.go
@@ -111,6 +111,14 @@
}
}
+func (srv *Server) verificationHandler(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "text/html")
+ _, err := w.Write([]byte("google-site-verification: google99d1f93c6755806b.html"))
+ if err != nil {
+ httputils.ReportError(w, r, err, "Failed to write.")
+ }
+}
+
func (srv *Server) tosHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
if *local {
@@ -265,6 +273,7 @@
r := mux.NewRouter()
r.HandleFunc("/drive", srv.driveHandler)
r.HandleFunc("/tos", srv.tosHandler)
+ r.HandleFunc("/google99d1f93c6755806b.html", srv.verificationHandler)
r.HandleFunc("/{hash:[0-9A-Za-z]*}", srv.mainHandler)
r.HandleFunc("/e/{hash:[0-9A-Za-z]*}", srv.embedHandler)
diff --git a/skottie/pages/index.html b/skottie/pages/index.html
index 9afcbcd..434eac3 100644
--- a/skottie/pages/index.html
+++ b/skottie/pages/index.html
@@ -5,7 +5,6 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="google-site-verification" content="pIHubYTE28EzwOWGWmHyNmxRNA6yclJyxSymw6uX8b8" />
<link rel="stylesheet" href="/static/jsoneditor.css">
</head>
<body>