use real IP address
This commit is contained in:
@@ -3,6 +3,7 @@ package webcontroller
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"fornaxian.com/pixeldrain-api/util"
|
||||||
"github.com/Fornaxian/log"
|
"github.com/Fornaxian/log"
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
)
|
)
|
||||||
@@ -13,6 +14,7 @@ func (wc *WebController) serveAdClick(w http.ResponseWriter, r *http.Request, p
|
|||||||
|
|
||||||
// Get a view token
|
// Get a view token
|
||||||
td := wc.newTemplateData(w, r)
|
td := wc.newTemplateData(w, r)
|
||||||
|
td.PixelAPI.RealIP = util.RemoteAddress(r)
|
||||||
vt := viewTokenOrBust(td.PixelAPI)
|
vt := viewTokenOrBust(td.PixelAPI)
|
||||||
|
|
||||||
// Log a view on the file
|
// Log a view on the file
|
||||||
|
Reference in New Issue
Block a user