Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

[Question] What are all the available options for expressions like %[dst_port] or %[req.hdr(host)] #671

@bond-

Description

@bond-

Can someone please point me to a link which lists all of the allowed expressions like %[dst_port] or %[req.hdr(host)]

I want to fill in forward headers like below:

"HAPROXY_0_BACKEND_HTTP_OPTIONS": "option forwardfor\n  http-request set-header X-Forwarded-Port %[dst_port]\n  http-request add-header X-Forwarded-Proto https if { ssl_fc }\n"

I have to fill in the below headers for the service to create a correct absolute link:

  • X-Forwarded-Host
  • X-Forwarded-Proto
  • X-Forwarded-Prefix

I have the host and port, but I would like to extract a piece of the context path:
For example, in the given URL being sent to marathon https://host/path/to/app-name/x/y/z I would like to extract /path/to/app-name and set to X-Forwarded-Prefix

If no such documentation link exists, can someone show me how it's done, and I can add a documentation link?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions