#web-server #http #tls-server #header #response-headers #request-response #request

rust-web-server

Collection of utility functions used to build Rust Web and TLS Server. Can be useful while developing HTTP related functionality

24 releases (15 major breaking)

16.1.0 Sep 3, 2023
15.1.0 Jul 20, 2023
14.0.0 Jun 14, 2023
13.0.0 May 27, 2023
0.0.28 Oct 11, 2022

#78 in HTTP client

MIT OR Apache-2…

3MB
28K SLoC

rust-web-framework

Collection of utility functions used to build Rust Web Server. Can be useful while developing HTTP related functionality.

Core lib for rust-web-server, rust-tls-server and http-to-https-letsencrypt.

NOTE! The corresponding crate is called rust-web-server.

Features

  1. Cross-Origin Resource Sharing (CORS). Allowing resources to be used on other domains can be crucial for providing APIs and services. Knowing how cumberstone and difficult is the process to setup the CORS, server ships with CORS enabled to all requests by default.
  2. HTTP Range Requests. Server supports requests for the part of the file, or several different parts of the file.
  3. HTTP Client Hints. Proactively asking client browser for suitable additional information about the system.
  4. X-Content-Type-Options set to nosniff, prevents from MIME type sniffing attacks.
  5. X-Frame-Options. Site is not allowed to be embedded into iframe on other domains.
  6. Symlinks. You can have symlinks in your folder and they will be resolved correctly.
  7. Caching done right. It means no caching and therefore no outdated uncontrollable resources.
  8. Resolving .html files without .html in path. It means if you try to open /some-html-file it will open file some-html-file.html and won't show 404 not found error. Same applies for folders. If you try to open /folder it will open file folder/index.html
  9. Extensive logging. It means server prints the request-response pairs as they are so you can see all the details like request method, path, version and headers.
  10. No third party dependencies.
  11. Forms (without files)

Documentation

Open documentation for details.

Community

Use GitHub discussions, issues and pull requests.

There is Rust Web Server Discord where you can ask questions and share ideas.

Follow the Rust code of conduct.

Frequently Asked Questions

Open FAQ for details.

Donations

Send me tips via PayPal.

Dependencies