1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Server is Up and Running
You see default page served by the server. You can change this page to whatever you need.
Simply put index.html in your server's root folder.
Whatever you put in the server folder will be accessible through the
URL
If you put file bigger than there is available memory and then request it,
server will be stopped with an error.
These are default resources provided by the server:
favicon.svg, index.html, 404.html, script.js and
style.css.
To override put corresponding files in the server's root folder.
Security based restrictions:
Website can not be used in iframe on other domains.
Resources will be sent to a user with a Content-Type based on file extension.
In practice this means if you, for example, create a js file named script.jstypo,
it won't be interpreted by a client's browser. Use correct file extensions.
Directory listing is not implemented. The reason behind this decision is security. To eliminate accidental sharing of unintended files.
As a workaround you can create html file with list of files you need to make available.
Useful links:
Rust Web Server — static content web-server written in Rust
Rust TLS Server — TLS capable server version
HTTP-to-HTTPS Let's Encrypt — HTTP server for traffic redirection to HTTPS