Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.54 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.54 KB

caddy-argsort

Build and test Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. GoDoc Go Report Card

This is a caddy plugin. Works with caddy >= 2.8.0. Sort the request query arguments. Optionally case insensitive.

Usage

Simple usage

Once the order has been set in the global options block, use argsort in any server block

:8881 {
    header Content-Type "text/html; charset=utf-8"
    respond "Hello."
    argsort
}

Optional case insensitive usage

Once the order has been set in the global options block, use argsort lowecase in any server block

:8881 {
    header Content-Type "text/html; charset=utf-8"
    respond "Hello."
    argsort lowercase
}

Forward the normalized request to an upstream

Once the order has been set in the global options block, you ensure query arguments sorting for an upstream server

:8882 {
    argsort
    reverse_proxy localhost:8883
}

:8883 {
    header Content-Type "text/html; charset=utf-8"
    respond "Hello."
}