Skip to content

Caddy module that will alphabetically sort the request query arguments

License

Notifications You must be signed in to change notification settings

teodorescuserban/caddy-argsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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."
}

About

Caddy module that will alphabetically sort the request query arguments

Resources

License

Stars

Watchers

Forks

Packages

No packages published