hide referer url

This commit is contained in:
Wim Brand
2020-02-26 17:34:01 +01:00
parent b4524ded62
commit 5d9dbd84c9
2 changed files with 25 additions and 0 deletions

View File

@@ -14,8 +14,11 @@ import (
func (wc *WebController) serveAdClick(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
// Redirect the user to the target page
w.Header().Set("Referrer-Policy", "origin")
http.Redirect(w, r, r.URL.Query().Get("target"), http.StatusTemporaryRedirect)
// wc.templates.Get().ExecuteTemplate(w, "hide_refer", r.URL.Query().Get("target"))
api := pixelapi.New(wc.apiURLInternal)
// The Real IP is used in the API server to determine that the view is not