aboutsummaryrefslogtreecommitdiff
path: root/doc/vmod-dbrw.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/vmod-dbrw.3')
-rw-r--r--doc/vmod-dbrw.324
1 files changed, 22 insertions, 2 deletions
diff --git a/doc/vmod-dbrw.3 b/doc/vmod-dbrw.3
index 2abef65..9bec008 100644
--- a/doc/vmod-dbrw.3
+++ b/doc/vmod-dbrw.3
@@ -10,13 +10,13 @@
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of 10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details. 12.\" GNU General Public License for more details.
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>. 15.\" along with vmod-dbrw. If not, see <http://www.gnu.org/licenses/>.
16.TH VMOD-DBRW 3 "December 8, 2018" "VMOD-DBRW" "User Reference" 16.TH VMOD-DBRW 3 "February 13, 2019" "VMOD-DBRW" "User Reference"
17.SH NAME 17.SH NAME
18vmod-dbrw \- Database-driven rewrite rules for Varnish Cache 18vmod-dbrw \- Database-driven rewrite rules for Varnish Cache
19.SH SYNOPSIS 19.SH SYNOPSIS
20.B import dbrw; 20.B import dbrw;
21.PP 21.PP
22.BI "VOID dbrw.config(STRING " dbtype ", STRING " params ", STRING " query ");" 22.BI "VOID dbrw.config(STRING " dbtype ", STRING " params ", STRING " query ");"
@@ -187,29 +187,49 @@ modify regular expression handling. The following flags are defined:
187.BR NC " or " nocase 187.BR NC " or " nocase
188Treat \fBregexp\fR as case-insensitive. 188Treat \fBregexp\fR as case-insensitive.
189.TP 189.TP
190.B case 190.B case
191Treat \fBregexp\fR as case-sensitive (default). 191Treat \fBregexp\fR as case-sensitive (default).
192.TP 192.TP
193.B eq
194Use exact string matching.
195.TP
193.BR QSA " or " qsappend 196.BR QSA " or " qsappend
194Treat the resulting value as URL; append any query string from the 197Treat the resulting value as URL; append any query string from the
195original \fBvalue\fR to it. 198original \fBvalue\fR to it.
196.TP 199.TP
197.BR QSD " or " qsdiscard 200.BR QSD " or " qsdiscard
198Treat the resulting value as URL; discard any query string attached to 201Treat the resulting value as URL; discard any query string attached to
199the original \fBvalue\fR. 202the original \fBvalue\fR.
200.TP 203.TP
201\fBredirect=\fICODE\fR or \fBR=\fICODE\fR 204\fBredirect=\fICODE\fR or \fBR=\fICODE\fR
202On success, set the \fBX\-VMOD\-DBRW\-Status\fR header to \fICODE\fR, 205On success, set the \fBX\-VMOD\-DBRW\-Status\fR header to \fICODE\fR,
203which must be a valid HTTP status code. 206which must be a valid HTTP status code.
207.TP
208.B regex
209Use regular expression matching. This is the default. This flag is
210provided for completeness sake, as a counterpart of
211.BR eq .
204.PP 212.PP
205If \fBregexp\fR or \fBvalue\fR is NULL, the tuple is handled as 213If \fBregexp\fR or \fBvalue\fR is NULL, the tuple is handled as
206described in 214described in
207.BR "Strict matches" . 215.BR "Strict matches" .
208.PP 216.PP
209If \fBflags\fR is NULL, it is ignored. 217If \fBflags\fR is NULL, it is ignored.
218.SH HTTP HEADERS
219Upon return,
220.B dbrw.return
221may set one of the following headers in
222.BR resp.http :
223.TP
224.B X\-VMOD\-DBRW\-Status
225If the \fBredirect\fR flag was used, this header contains the HTTP
226response code to be used instead of the default.
227.TP
228.B X\-VMOD\-DBRW\-Error
229This header is set to \fB1\fR if an error occurred during the rewrite.
210.SH EXAMPLES 230.SH EXAMPLES
211The examples in this section assume \fBMySQL\fR databases. Any 231The examples in this section assume \fBMySQL\fR databases. Any
212details not related to \fBvmod-dbrw\fR are omitted. 232details not related to \fBvmod-dbrw\fR are omitted.
213.SS Redirects 233.SS Redirects
214.PP 234.PP
215This example shows how to implement apache-style permanent redirects 235This example shows how to implement apache-style permanent redirects

Return to:

Send suggestions and report system problems to the System administrator.