referer-parser
read placeholder value in the example, while the production setting is not documented.
I need referer-parser
to read real referer value instead of placeholder value.
Below is my code (the referer_url
read placeholder value):
package main
import (
"github.com/labstack/echo"
"github.com/snowplow/referer-parser/go"
"net/http"
)
func main() {
e := echo.New()
referer_url := "http://www.google.com/search?q=gateway+oracle+cards+denise+linn&hl=en&client=safari"
r := refererparser.Parse(referer_url)
e.Get("/users", func(c *echo.Context) *echo.HTTPError {
return c.String(http.StatusOK, "The search term is: "+r.SearchTerm)
})
e.Run(":4444")
}