Commit Graph

23 Commits

Author SHA1 Message Date
Flozza 509a033c84
Fix wrong URL in guide (configuration) 2024-08-07 21:36:52 -05:00
Sergio Benitez f50b6043e8 Improve FileServer rewrite API.
Finalizes the FileServer rewrite API implementation. Primarily reworks
how the built-in rewriters are written (now as structs instead of free
functions) and reorganizes the `fs` module.

Co-authored-by: Matthew Pomes <matthew.pomes@pm.me>
2024-07-06 15:34:21 +02:00
Vadim Anufriev fb4b630405
Add MiniJinja for templating example (#2799)
Update guide to mention MiniJinja.
Adds MiniJinja to the templating example.
2024-06-26 01:27:44 -05:00
Arjen cde1fb5de0 Improve example TOML in configuration guide. 2024-05-22 16:52:32 -05:00
Sergio Benitez 3079dbfa85 Use workspace lints. Resolve new nightly warnings. 2024-05-20 13:39:14 -05:00
Sergio Benitez 84072a813a Add deploying guide.
Resolves #171.
2024-04-25 20:03:44 -07:00
Sergio Benitez 836e64fec3 Rename 'Rocket::configure()' to 'reconfigure()'. 2024-04-25 14:47:43 -07:00
Sergio Benitez 7cc818cd85 Introduce dynamic TLS resolvers.
This commit introduces the ability to dynamically select a TLS
configuration based on the client's TLS hello via the new `Resolver`
trait. In support of this, it also makes the following changes:

  * Added `Authority::set_port()`.
  * `UdsListener` is now `UnixListener`.
  * `Bindable` removed in favor of new `Bind`.
  * All built-in listeners now implement `Bind<&Rocket>`.
  * `Connection` requires `AsyncRead + AsyncWrite`.
  * The `Debug` impl for `Endpoint` displays the underlying address.
  * `Listener` must be `Sized`.
  * The TLS listener was moved to `tls::TlsListener`.
  * The preview `quic` listener no longer implements `Listener`.
  * Added `TlsConfig::server_config()`.
  * Added `race` future helpers.
  * Added `Rocket::launch_with()`, `Rocket::bind_launch()`.
  * Added a default `client.pem` to the TLS example.
  * Various unnecessary listener `Config` structures removed.

In addition, the testbench was revamped to support more scenarios. This
resulted in the following issues being found and fixed:

  * Fix an issue where the logger would ignore color requests.
  * Clarified docs for `mtls::Certificate` guard.
  * Improved error messages on listener misconfiguration.

Resolves #2730.
Resolves #2363.
Closes #2748.
Closes #2683.
Closes #2577.
2024-04-16 23:50:28 -07:00
Sergio Benitez 0edbb6dad5 Document changeable TLS 'CryptoProvider's. 2024-03-31 11:46:56 -07:00
Sergio Benitez 1619bbbddc Support QUIC and HTTP/3.
This commit adds support for HTTP/3 and QUIC under a disabled-by-default
feature `http3-preview`. The current implementation depends on modified
versions of h3 and s2n-quic-h3 which will need to be upstreamed and
published before a release is possible.

During the course of development various facets of Rocket's internal
connection handling and recent listener APIs were improved. The complete
list of changes included in this PR is:

  * A `shutdown` module was introduced.
  * `config::Shutdown` was renamed to `ShutdownConfig` and moved to
    `shutdown` while being re-exported from `config`.
  * `ListenerAddr` is now called `Endpoint`. Various methods which
    previously referred to "addresses" now refer to "endpoints".
  * `Rocket::endpoint()` was renamed to `Rocket::endpoints()` and now
    returns an iterator over the endpoints Rocket is listening on.
  * `Endpoint` acquired various query utility methods.
  * The `{set_}remote()` methods now take/produce `Endpoint`s.
  * `TlsBindable` only accepts single-phase internal interfaces.
  * Bind error messages include candidate endpoint info when possible.
  * The warning message when a secret key is not configured now includes
    information about its effect on private cookies.

Internal changes include:

  * Config module tests were moved to `config/tests.rs`.
  * The cancellable I/O implementation was significantly simplified.
  * The `TripWire` implementation was simplified.
  * Individual shutdown stages can now be awaited on via `Stages`.
  * The `Shield` implementation was simplified.

Resolves #2723.
2024-03-18 20:23:22 -07:00
John Bampton fd739bab4e Fix WebSocket FAQ entry, typos. 2024-03-04 12:37:29 -08:00
Sergio Benitez 8d3f1d65ac Reorganize and upgrade markup in site docs.
The guide is now in docs/guide. All other site assets are being migrated
to a separate repository.

The guide markup has been upgraded to take advantages of improvements in
the static site generator used to build the Rocket website.
2024-02-28 23:41:02 -08:00
Sergio Benitez d28b4eb05b Remove outdated docs. 2016-12-23 06:04:36 -08:00
Sergio Benitez 15fe6ec8d0 Remove stale documents. Merge existing docs into one guide. 2016-11-13 19:01:09 -08:00
Sergio Benitez 79eab0e907 A somewhat complete overview. 2016-10-20 04:40:45 -07:00
Sergio Benitez aa2f2061ac Update outline for latest API changes. 2016-10-12 19:41:30 -07:00
Sergio Benitez f9e17ce7df Update docs for latest changes. 2016-10-04 15:05:25 -07:00
Sergio Benitez 23808d00bc This commit squash three form-related commits:
Remove form_items function in favor of FormItems iterator.

  Add specialized `bool` implementation of FromFormValue.

  Add `&str` implementation of FromFormValue for debugging.
2016-09-28 19:29:18 -07:00
Sergio Benitez be50ddeca4 Tweaks to the overview. 2016-09-27 22:26:39 -07:00
Sergio Benitez 0972994285 Initial overview document. 2016-09-26 00:41:46 -07:00
Sergio Benitez a967018009 Add guide outline. Remove unused file. 2016-09-22 22:09:41 -07:00
Sergio Benitez 084a9125fa Initial documentation. 2016-09-22 21:28:46 -07:00
Sergio Benitez 967fcd26b2 Initial commit. Checking for method and path arguments in route. Not storing the info anywhere yet. 2016-03-07 11:28:04 -08:00