From 8459bebceb9533948193774371cbd9fd571b78ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 16 Oct 2019 09:48:31 +0200 Subject: Cowboy 2.7.0 --- docs/en/cowboy/2.4/manual/cowboy_static/index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs/en/cowboy/2.4/manual/cowboy_static/index.html') diff --git a/docs/en/cowboy/2.4/manual/cowboy_static/index.html b/docs/en/cowboy/2.4/manual/cowboy_static/index.html index f493c2ed..3176d107 100644 --- a/docs/en/cowboy/2.4/manual/cowboy_static/index.html +++ b/docs/en/cowboy/2.4/manual/cowboy_static/index.html @@ -68,7 +68,7 @@

The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.

The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.

Options

-
@@ -114,7 +114,7 @@ http://www.gnu.org/software/src-highlite -->

The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.

By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with {etag, false} or provide a module and function that will be called when needed:

-
@@ -125,7 +125,7 @@ http://www.gnu.org/software/src-highlite --> Mtime :: file:date_time()

By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:

-
@@ -144,7 +144,7 @@ http://www.gnu.org/software/src-highlite -->

Examples

Custom etag function
-
@@ -153,7 +153,7 @@ http://www.gnu.org/software/src-highlite --> erlang:phash2({Path, Size, Mtime}, 16#ffffffff))}.
Custom MIME type function
-
@@ -200,6 +200,8 @@ http://www.gnu.org/software/src-highlite --> +
  • 2.7
  • +
  • 2.6
  • 2.5
  • -- cgit v1.2.3