From c1b0488fa17ee51a93a5f73d9e204f830085d9be Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 16 Jul 2026 10:41:56 -1000 Subject: Prune and rename the filter extensions The Gentoo LDAP filter is distro specific, the owner example only restates what cgit already renders, and the about converters are superseded by the built-in markdown rendering. The two auth filters do the same job and differ only in where their accounts live, so they become auth-inline for accounts kept in the script and auth-file for accounts kept on disk. --- cgitrc.5.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index f45b91d..0c78ecb 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -725,15 +725,16 @@ auth filter:: When the filter action is "body", this filter must write to output the HTML for displaying the login form, which POSTs to the login url. When the filter action is "authenticate-cookie", this filter must validate - the http cookie and return a 0 if it is invalid or 1 if it is invalid, + the http cookie and return a 0 if it is invalid or 1 if it is valid, in the exit code / close function. If the filter action is "authenticate-post", this filter receives POST'd parameters on standard input, and should write a complete CGI response, preferably with a 302 redirect, and write to output one or more "Set-Cookie" HTTP headers, each followed by a newline. - Please see `extensions/simple-authentication.lua` for a clear example - script that may be modified. + See `extensions/auth-inline.lua` for a ready to modify example that + keeps its user list inline, or `extensions/auth-file.lua` for the + same filter reading its users from files on disk. commit filter:: This filter is given no arguments. The commit message text that is to @@ -929,9 +930,9 @@ mimetype.svg=image/svg+xml # Source code is highlighted in the browser by the bundled cgit.js, so no # source-filter is needed here. Set one only to override that. -# Markdown about pages render client-side by default (see enable-markdown), -# so a filter is only needed for other formats such as manpages. -about-filter=/var/www/cgit/filters/about-formatting.sh +# Markdown about pages render client-side by default (see enable-markdown). +# For other formats such as manpages, point about-filter at your own script. +# about-filter=/var/www/cgit/filters/my-about-formatter ## ## Search for these files in the root of the default branch of repositories -- cgit 2.12.1