Software /
code /
prosody
Annotate
teal-src/net/http/files.d.tl @ 12713:52eead170bb8
util.paseto: Drop custom wrappers around key objects
The PASETO spec recommends - no, *requires* - that implementations enforce
type safety for keys, and e.g. do not pass them around as arbitrary byte
strings. Typed wrapper objects are recommended.
I originally followed this advice when starting the lib. However, key wrapping
and type safety is now also a feature of util.crypto. All we're doing is
duplicating it unnecessarily with this additional wrapper code.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 11 Jul 2022 14:30:39 +0100 |
parent | 12609:a8eb838fc6cf |
rev | line source |
---|---|
12609
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 local record serve_options |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 path : string |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 mime_map : { string : string } |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 cache_size : integer |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 cache_max_file_size : integer |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 index_files : { string } |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 directory_index : boolean |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 end |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 local record http_files |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 serve : function(serve_options|string) : function |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 end |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 |
a8eb838fc6cf
net.http: Add teal description files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 return http_files |