<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/style.css">
<link rel="icon" href="/favicon.svg">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<h1>Server is Up and Running</h1>
<div>You see default page served by the server. You can change this page to whatever you need.
Simply put <span class="accent">index.html</span> in your server's root folder.
</div>
<div>Whatever you put in the server folder will be accessible through the
<a href="/" class="location accent">URL</a>
</div>
<div>If you put file bigger than there is available memory and then request it,
server will be stopped with an error.
</div>
<div>These are default resources provided by the server:
<span class="accent">favicon.svg, index.html, 404.html, script.js</span> and
<span class="accent">style.css</span>.
To override put corresponding files in the server's root folder.
</div>
<div>Security based restrictions:
<ul>
<li>Website can not be used in iframe on other domains.</li>
<li>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.
</li>
<li>
Directory listing is not implemented. The reason behind this decision is security. To eliminate accidental sharing of unintended files.
<br>
As a workaround you can create html file with list of files you need to make available.
</li>
<li>
Cookies are not implemented for Rust Web Server.
The reason behind it is safety concerns as
rws is a http server. As a developer you may use
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage">localStorage</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage">sessionStorage</a> to bypass absence
of the cookies.
</li>
</ul>
</div>
<h2>Useful links: </h2>
<ul>
<li><a href="https://github.com/bohdaq/rust-web-server">Rust Web Server</a> — static content web-server written in Rust</li>
<li><a href="https://github.com/bohdaq/rust-tls-server">Rust TLS Server</a> — TLS capable server version</li>
<li><a href="https://github.com/bohdaq/http-to-https-letsencrypt">HTTP-to-HTTPS Let's Encrypt</a> — HTTP server for traffic redirection to HTTPS</li>
</ul>
</div>
<script src="script.js"></script>
</body>
</html>