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