Any variable that contains unique request_id or anything similar? - eviltoast

In Squid config, is there any variable - %VAR - that contains the current unique request id or anything similar?

I’ll need to pass that into an external script, for instance:

# squi.conf
auth_param basic program %REQUEST_ID(???) /etc/squid/my_auth.py

This may not be an authentication script, this is just an example.

I’ve searched but haven’t found anything about it.

  • colonelp4nic@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    Generally unique request IDs have to be generated by the client that sends the request. If the client doesn’t generate an ID, you’re probably out of luck. That said, do you have information about the client you’re expecting to call your Squid cache? One unofficial, but common place for clients to put a request ID is in the header “X-Request-ID”