Add content policy and add abuse categories
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"fornaxian.tech/pixeldrain_server/api/restapi/apiclient"
|
||||
"fornaxian.tech/pixeldrain_server/util"
|
||||
"github.com/Fornaxian/log"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
@@ -15,11 +14,9 @@ func (wc *WebController) serveAdClick(w http.ResponseWriter, r *http.Request, p
|
||||
w.Header().Set("Referrer-Policy", "origin")
|
||||
http.Redirect(w, r, r.URL.Query().Get("target"), http.StatusTemporaryRedirect)
|
||||
|
||||
api := apiclient.New(wc.apiURLInternal)
|
||||
|
||||
// The Real IP is used in the API server to determine that the view is not
|
||||
// fake
|
||||
api.RealIP = util.RemoteAddress(r)
|
||||
var api = wc.api.RealIP(util.RemoteAddress(r))
|
||||
|
||||
// Log a view on the file
|
||||
if err := api.PostFileView(p.ByName("id"), wc.viewTokenOrBust()); err != nil {
|
||||
|
Reference in New Issue
Block a user