summaryrefslogtreecommitdiff
path: root/system/api/push.go
diff options
context:
space:
mode:
Diffstat (limited to 'system/api/push.go')
-rw-r--r--system/api/push.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/api/push.go b/system/api/push.go
index 3378f0c..5db0a53 100644
--- a/system/api/push.go
+++ b/system/api/push.go
@@ -9,7 +9,7 @@ import (
"github.com/tidwall/gjson"
)
-func push(res http.ResponseWriter, pt func() interface{}, data []byte) {
+func push(res http.ResponseWriter, req *http.Request, pt func() interface{}, data []byte) {
// Push(target string, opts *PushOptions) error
if pusher, ok := res.(http.Pusher); ok {
if p, ok := pt().(item.Pushable); ok {
@@ -23,7 +23,7 @@ func push(res http.ResponseWriter, pt func() interface{}, data []byte) {
for i := range values {
val := values[i]
val.ForEach(func(k, v gjson.Result) bool {
- err := pusher.Push(v.String(), nil)
+ err := pusher.Push(req.URL.Path+v.String(), nil)
if err != nil {
log.Println("Error during Push of value:", v.String())
}