Commit Graph

299 Commits

Author SHA1 Message Date
Sergio Benitez d22e093d92 Fix responder derive usage docs in response guide.
The guide previously erroneously stated that `Status` could be used as a
header field. This commit clarifies how to use `Status` in a custom
responder. It also expands the section with notes on how to make use of
the `Responder` derive with `enum`s.

Resolves #2484.
2023-03-26 17:41:24 -07:00
Sergio Benitez 91f6288ea4 New version: 0.5.0-rc.3.
New contrib versions: 0.1.0-rc.3.
2023-03-23 16:56:17 -07:00
IFcoltransG e86d503ff0 Fix typo in updating guide: 'phase' -> 'faze'. 2023-03-23 16:27:08 -07:00
Sergio Benitez 380e75c4e4 Fix minor typo. 2023-03-23 16:27:08 -07:00
philipp 6742041468 Remove unnecessary word in state docs. 2023-03-23 16:27:08 -07:00
Sergio Benitez 219a8a5468 Fix a bunch of typos. 2023-03-23 16:27:08 -07:00
Beep LIN 78e6e55aa2 Fix typo: 'FromFrom' -> 'FromForm'. 2023-03-23 14:57:54 -07:00
Sergio Benitez 0a0f540988 Support TLS keys in SEC1 format. 2023-03-23 14:57:54 -07:00
Kian-Meng Ang 06d255b52b Fix a whole bunch of typos.
Found via `codespell -L crate,ser,fo,noo,nd,cappable,pard,te,ans`.
2023-03-23 14:57:54 -07:00
Sergio Benitez 0ed6d82d10 Defend against configured known secret keys.
This is a two-prong effort. First, we warn on launch if a known key is
used. Second, we document using invalid keys where possible.

Co-authored-by: Jonas Møller <jonas@moesys.no>
2023-03-23 14:57:54 -07:00
Indosaram a62cc654be Fix typo in pastebin tutorial. 2023-03-23 14:57:54 -07:00
Sergio Benitez 9377af5978 Make real IP header configurable via 'ip_header'.
Adds an `ip_header` configuration parameter that allows modifying the
header Rocket attempts to use to retrieve the "real IP" address of the
client via `Request` methods like `client_ip()`. Additionally allows
disabling the use of any such header.
2023-03-20 12:57:21 -07:00
Sergio Benitez 682c2d9acf Update database driver version numbers in docs. 2022-09-18 01:27:36 -07:00
Doni Rubiagatra b7c03ce2b5 Fix typo in getting started guide.
Replace 'installled' with 'installed'.
2022-08-01 11:35:42 -07:00
Charles-Axel Dein e65f0ff494 Fix typo in configuration guide.
Replace 'demonstratation' with 'demonstration'.
2022-08-01 11:34:31 -07:00
Felix Suominen ef5b7f89a5 Fix typo in production readiness FAQ.
Replace 'zero-downtown' with 'zero-downtime'.
2022-08-01 11:32:59 -07:00
Sergio Benitez dfea521eb6 Fix guide page names to match search slugs.
Resolves #2223.
2022-06-21 13:40:46 -07:00
Matthew Pomes 47946cc55c Add 'max_blocking' threads config value. 2022-05-23 21:55:16 -07:00
Kenneth Allen 1587c501f3 Fix typo in 0.5 upgrade guide. 2022-05-23 16:37:18 -07:00
Sergio Benitez b4e1cac7a2 Fix Rocket's dependency count in FAQ. 2022-05-18 17:34:18 -07:00
Sergio Benitez 4dcd92837f New version: 0.5.0-rc.2.
New contrib versions: 0.1.0-rc.2.
2022-05-09 06:32:46 -05:00
Sergio Benitez 29fc7f54f5 Fix broken anchor link in config guide. 2022-05-09 06:32:46 -05:00
Sergio Benitez 0a8f917180 Update build benchmark in FAQ. 2022-05-09 06:32:46 -05:00
Sergio Benitez e1a19054d0 Update state guide for 'rocket_db_pools'. 2022-05-09 04:56:07 -05:00
Sergio Benitez 58b96b8e94 Update CHANGELOG for rc.2, missing rc.1 changes.
Closes #1923.
2022-05-09 01:30:57 -05:00
Sergio Benitez 78aad3aa95 Fix 'PasteId' 'use' in pastebin tutorial. 2022-05-08 18:30:13 -05:00
Sergio Benitez fccb5759db Revamp pastebin tutorial for Rocket v0.5.
Closes #1756.
2022-05-08 01:57:49 -05:00
Sergio Benitez 7908dc43ca Introduce shutdown fairings.
Also adds 'Client::terminate()' to run graceful shutdown in testing.

Resolves #1707.
2022-05-07 06:12:32 -05:00
Sergio Benitez 1575f47753 Update FAQ. 2022-05-07 06:12:32 -05:00
Sergio Benitez 0ba56ccbb3 Revamp shutdown to recover shutdown 'Rocket'.
The core improvement is that `Rocket::launch()` now resolves to
`Ok(Rocket<Ignite>)` on nominal shutdown. Furthermore, shutdown never
terminates the running process.

Other changes directly related to shutdown:

  * Runtime worker thread names are now irrelevant to graceful shutdown.
  * `ErrorKind::Runtime` was removed; `ErrorKind::Shutdown` was added.
  * The `force` config value is only read from the default provider.
  * If `force`, Rocket's constructed async runtime is terminated.

Other related changes:

  * The exported `hyper` module docs properly reflect public re-exports.
2022-05-07 06:12:24 -05:00
Sergio Benitez 761ffb009e Add clarity around 'serde' re-exports.
Closes #2038.
2022-05-06 04:38:27 -05:00
Sergio Benitez bc2315943b Allow 'unused_doc_comments' on generated doctests. 2022-04-19 13:13:33 -07:00
Aditya 72e1bce2f2 Fix link to OWASP path traversal docs in guide. 2022-02-23 14:25:31 -08:00
Joshua Nitschke eba469b558 Fix 'form' data limit name in configuration guide. 2022-02-23 14:21:37 -08:00
Matthew Pomes a05b3e138c Explicitly doc enabling 'json' feature in guide.
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2022-02-23 13:38:50 -08:00
arlecchino 1ba41b3990 Remove 'CookieJar::get_private_pending()'.
This commit removes the 'CookieJar::get_private_pending()' method in
favor of the already existing and correct 'CookieJar::get_pending()'
method. Previously, the 'CookieJar::get_private_pending()' method
attempted to decrypt the value of a pending cookie, which in reality is
plaintext, thus failing. Because the pending value is plaintext, the
'CookieJar::get_pending()' method suffices.

Documentation has been updated to refer to 'CookieJar::get_pending()'.

Fixes #2063.
2022-02-17 11:04:30 -08:00
Johannes Liebermann 815e8a242f Fix typo in guide overview. 2021-09-07 12:02:56 -07:00
Sergio Benitez f38cbea898 Clean up upgrade guide, FAQ. Mention FAQ more. 2021-08-29 16:55:07 -07:00
Sergio Benitez 010e762125 Fix markdown word wrap. 2021-08-24 20:13:13 -07:00
hiyoko3m 5c928488ee Add missing ']' in forms guide. 2021-08-24 20:13:13 -07:00
Sergio Benitez a361bbd899 Add 0.5 migration guide, FAQ to site docs. 2021-08-19 19:49:23 -07:00
Jeremy Kaplan 26ca47b03d Fix typo in requests guide: 'Synax' -> 'Syntax'. 2021-08-01 11:47:09 -07:00
Silas Sewell 31d06ee714 Fix 'ROCKET_CLI_COLORS' example in getting started guide: 'off' -> 'false'. 2021-07-24 15:15:43 -07:00
JR Heard 3b9fd56d4c Fix typo in fairings guide: missing 'of the'. 2021-07-24 14:55:50 -07:00
Sergio Benitez cc0621626b Prefix 'content' responder names with 'Raw'.
The primary aim of this commit is to reduce confusion between
'content::Json' and 'rocket::serde::json::Json' be renaming the former
to 'content::RawJson'. The complete changes in this PR are:

  * All responders in the 'content' module are prefixed with 'Raw'.
  * The 'content::Custom' responder was removed entirely.
  * The 'Plain' responder is now 'RawText'.
  * The 'content' API docs point to the 'serde' responders.
  * The docs and examples were updated accordingly.
2021-07-20 02:09:11 -07:00
Sergio Benitez 7ffe3a7360 Complete mTLS implementation.
Resolves #254.
2021-07-09 00:05:44 -07:00
Sergio Benitez 416f42bca7 Fix header level of "Within Guards" in guide.
Resolves #1737.
2021-06-30 21:02:28 -07:00
multisn8 8f9d7e6374 Fix guide typo: "deserialzies" -> "deserializes". 2021-06-30 11:08:51 -07:00
Ian Jackson 42f84f0621 Update IRC links to Libera (irc.libera.chat). 2021-06-30 11:04:54 -07:00
Martinez 2bd5cefedd Check response status in guide form tests. 2021-06-30 11:01:32 -07:00