FTBpro/count-von-count

Referer request metadata parameters plugin

Closed this issue · 2 comments

I just set up Count von Count and realized I need to group the counts by referer, meaning the webpage that triggered the count.
I guess writing my own "referer" request metadata parameters plugin in Lua is the only option, right?
Have you (or someone else) ever done this?

Hey Manuel,
If you can pass the referrer (or some id/name representing it) as a query string param then it'll make it very easy, and all you'll need to do is just define the counter you wish in the voncount.config file.

If not, then yes - you'll need to write such plugin.
If you do so and encounter problems or need any help, we'll be happy to assist!

Cheers,
Shai

No, unfortunately I cannot do it via a parameter, I really need the referer HTTP header.
But I guess I can get it via ngx.req.get_headers()["Referer"] so it shouldn't be too hard to implement.
Thanks for the help offer, I'm sure I will need it at some point. 😄