We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72f141a commit 8d80731Copy full SHA for 8d80731
1 file changed
main.go
@@ -21,7 +21,9 @@ func init() {
21
22
// ServerHandle handle proxy logic
23
func ServerHandle(w http.ResponseWriter, req *http.Request) {
24
- if req.Method != "GET" {
+ if req.Method != "GET" ||
25
+ len(req.Referer()) == 0 || len(req.FormValue("ga")) == 0 {
26
+ w.WriteHeader(http.StatusBadRequest)
27
return
28
}
29
@@ -30,7 +32,7 @@ func ServerHandle(w http.ResponseWriter, req *http.Request) {
30
32
31
33
uid := GetOrSetUUID(w, req)
34
- w.WriteHeader(http.StatusNoContent)
35
+ w.WriteHeader(http.StatusOK)
36
37
go SendData(uid, req)
38
0 commit comments