Nikolay Kim
127af92541
clippy warnings
2018-10-01 21:16:56 -07:00
Nikolay Kim
9f1417af30
refactor http service builder
2018-09-27 18:33:29 -07:00
Douman
1b298142e3
Correct composing of multiple origins in cors ( #518 )
2018-09-21 08:45:22 +03:00
Nikolay Kim
002bb24b26
unhide SessionBackend and SessionImpl traits and cleanup warnings
2018-09-07 20:46:43 -07:00
Nikolay Kim
1716380f08
clippy fmt
2018-08-23 09:48:01 -07:00
Mathieu Amiot
9a10d8aa7a
Fixed headers' formating for CORS Middleware Access-Control-Expose-Headers header value to HTTP/1.1 & HTTP/2 spec-compliant format ( #436 )
2018-08-03 15:03:11 +03:00
Nikolay Kim
d3b12d885e
Merge branch 'master' into master
2018-07-24 14:07:03 -07:00
Denis Kolodin
b367f07d56
Add http_only flag to CookieSessionBackend
2018-07-23 12:49:59 +03:00
Damjan Georgievski
56b924e155
remove the timestamp from the default logger middleware
...
env_logger and other logging systems will (or should) already add their
own timestamp.
2018-07-21 15:15:28 +02:00
Douman
29a275b0f5
Session should write percent encoded cookies and add cookie middleware test ( #393 )
...
* Should write percent encoded cookies to HTTP response
* Add cookie middleware test
2018-07-17 08:38:18 +03:00
Nikolay Kim
da915972c0
refactor router
2018-07-15 16:25:56 +06:00
Nikolay Kim
b8b90d9ec9
rename ResourceHandler to Resource
2018-07-12 15:30:01 +06:00
Nikolay Kim
6fd686ef98
cleanup warnings
2018-07-04 21:01:27 +06:00
Nikolay Kim
fec6047ddc
refactor HttpRequest mutability
2018-07-02 23:35:32 +06:00
Nikolay Kim
4fadff63f4
Use Box::leak for dynamic param names
2018-06-23 09:57:03 +06:00
Nikolay Kim
765c38e7b9
remove libc dependency
2018-06-22 11:47:33 +06:00
Nikolay Kim
65ca563579
use read only self for Middleware
2018-06-21 23:06:23 +06:00
Nikolay Kim
0f2aac1a27
remove unneed Send and Sync
2018-06-17 08:32:22 +06:00
Nikolay Kim
8261cf437d
update actix api
2018-06-13 23:37:19 -07:00
Nikolay Kim
f94fd9ebee
CORS: Do not validate Origin header on non-OPTION requests #271
2018-06-05 07:39:47 -07:00
Nikolay Kim
984791187a
Middleware::response is not invoked if error result was returned by another Middleware::start #255
2018-06-04 13:42:47 -07:00
Matthijs Brobbel
268c5d9238
Fix typo
2018-06-03 20:28:08 +02:00
Nikolay Kim
a61a1b0efe
Merge branch 'master' into trait-middleware-mut-self
2018-06-02 08:54:00 -07:00
Pascal Hertleif
890a7e70d6
Add missing API docs
...
These were written without much knowledge of the actix-web internals!
Please review carefully!
2018-06-02 15:52:50 +02:00
Josh Leeb-du Toit
9c9eb62031
Update Middleware trait to use &mut self
2018-06-02 16:47:18 +10:00
Nikolay Kim
c8930b7b6b
fix rustfmt formatting
2018-06-01 10:27:23 -07:00
Nikolay Kim
3f5a39a5b7
cargo fmt
2018-06-01 09:37:14 -07:00
Nikolay Kim
154cd3c5de
better actix mod re-exports
2018-06-01 09:36:16 -07:00
Douman
80965d7a9a
Re-export actix dependency. Closes #260 ( #264 )
...
- Re-export actix's prelude into actix namespace
- Removing implicit dependency on root's actix module
2018-05-31 20:43:14 +03:00
Nikolay Kim
ecd05662c0
use new actix system api
2018-05-29 10:31:37 -07:00
Bruno Bigras
4dcecd907b
Add same-site to CookieSessionBackend
...
closes #247
2018-05-25 19:18:16 -04:00
Nikolay Kim
45e9aaa462
rustfmt 0.7
2018-05-17 12:20:20 -07:00
Nikolay Kim
8de1f60347
add session extractor doc api
2018-05-16 21:05:59 -07:00
Nikolay Kim
b4252f8fd1
implement extractor for Session
2018-05-16 21:02:51 -07:00
Nikolay Kim
54c33a7aff
Allow to exclude certain endpoints from logging #211
2018-05-08 16:30:34 -07:00
Alexander Andreev
cd11293c1f
spelling check
2018-05-06 19:07:30 +03:00
Nikolay Kim
58079b5bbe
add session test
2018-05-02 19:11:44 -07:00
Nikolay Kim
32a2866449
Allow to override files listing renderer for #203
2018-05-02 15:53:07 -07:00
Nikolay Kim
9b6343d54b
refactor session impl
2018-05-01 09:40:23 -07:00
Nikolay Kim
d9a4fadaae
make HttpRequest::extensions() readonly
2018-05-01 09:05:50 -07:00
Nikolay Kim
eefbe19651
remove deprecated types and methods
2018-04-29 21:05:10 -07:00
Nikolay Kim
c72d1381a6
clippy warnings
2018-04-29 09:09:08 -07:00
Nikolay Kim
de49796fd1
clippy warnings; fmt
2018-04-28 22:55:47 -07:00
Brandur
59244b203c
Let CSRF's allowed_origin()
be specified as a type supporting Into<String>
...
A very minor addition: I'm using this middleware on specific resources,
and given a non-static string, I often have to `clone()` already to get
a string into a closure. Take this code for example:
``` rust
let server = actix_web::server::new(move || {
let csrf_origin_graphql = csrf_origin.clone();
...
.resource("/graphql", move |r| {
r.middleware(
csrf::CsrfFilter::new().allowed_origin(csrf_origin_graphql.as_str()),
);
r.method(Method::POST).a(graphql::handlers::graphql_post);
})
```
Letting `allowed_origin()` take an `Into<String>` instead of `&str` would
prevent a second `clone()` in the code above, and also make the code a little
nicer to read (you eliminate the `.as_str()` above). This is a pattern that
seems to be common throughout actix-web already anyway, so it should also be
fine to have here.
2018-04-21 08:41:06 -07:00
Nikolay Kim
813d1d6e66
doc strings layout
2018-04-18 20:41:03 -07:00
Nikolay Kim
48b02abee7
fmt
2018-04-18 20:16:29 -07:00
Nikolay Kim
ce1081432b
export session module
2018-04-18 20:11:49 -07:00
Nikolay Kim
e9bdba57a0
Add identity service middleware
2018-04-18 19:05:24 -07:00
Nikolay Kim
113f5ad1a8
add rustfmt config
2018-04-13 16:02:01 -07:00
Nikolay Kim
23eea54776
update cors doc string
2018-04-09 21:39:32 -07:00