some small code improvements

This commit is contained in:
Simon Cruanes 2021-12-20 09:49:44 -05:00 committed by GitHub
parent fe0da80f2f
commit ce4b5f0a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -456,7 +456,8 @@ module Route : sig
val exact_path : string -> ('a,'b) t -> ('a,'b) t
(** [exact_path "foo/bar/..." r] is equivalent to
[exact "foo" @/ exact "bar" @/ ... @/ r] **)
[exact "foo" @/ exact "bar" @/ ... @/ r]
@since NEXT_RELEASE **)
val pp : Format.formatter -> _ t -> unit
(** Print the route.

View file

@ -14,11 +14,11 @@ type config = {
}
let default_config () : config =
{ download=true
; dir_behavior=Forbidden
; delete=false
; upload=false
; max_upload_size = 10 * 1024 * 1024
{ download=true;
dir_behavior=Forbidden;
delete=false;
upload=false;
max_upload_size = 10 * 1024 * 1024;
}
let contains_dot_dot s =

View file

@ -5,7 +5,7 @@ type dir_behavior =
(** Redirect to index.html if present *)
| Lists
(** Lists content of directory *)
| IndexAndLists
| Index_or_lists
(** Redirect to index.html if present and Lists content otherwise *)
| Forbidden
(** Forbid access to directory *)