diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/srcdoc/configure/expires_directives.mt | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/server/h2o/libh2o/srcdoc/configure/expires_directives.mt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/srcdoc/configure/expires_directives.mt b/web/server/h2o/libh2o/srcdoc/configure/expires_directives.mt new file mode 100644 index 00000000..a3b22f85 --- /dev/null +++ b/web/server/h2o/libh2o/srcdoc/configure/expires_directives.mt @@ -0,0 +1,32 @@ +? my $ctx = $main::context; +? $_mt->wrapper_file("wrapper.mt", "Configure", "Expires Directives")->(sub { + +<p> +This document describes the configuration directives of the expires handler. +</p> + +<? +$ctx->{directive}->( + name => "expires", + levels => [ qw(global host path extension) ], + desc => <<'EOT', +An optional directive for setting the <code>Cache-Control: max-age=</code> header. +EOT +)->(sub { +?> +<ul> +<li>if the argument is <code>OFF</code> the feature is not used +<li>if the value is <code><i>NUMBER</i> <i>UNIT</i></code> then the header is set +<li>the units recognized are: <code>second</code>, <code>minute</code>, <code>hour</code>, <code>day</code>, <code>month</code>, <code>year</code> +<li> the units can also be in plural forms +</ul> +<?= $ctx->{example}->('Set <code>Cache-Control: max-age=86400</code>', <<'EOT') +expires: 1 day +EOT +?> +<p> +You can also find an example that conditionally sets the header depending on the aspects of a request in <a href="configure/mruby.html#modifying-response">Modifying the Response section of the Mruby directives documentation</a>. +</p> +? }) + +? }) |