mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 02:19:22 +02:00
chore(actix-session): prepare release 0.9.0
This commit is contained in:
@ -25,14 +25,14 @@
|
||||
//! async fn main() -> std::io::Result<()> {
|
||||
//! HttpServer::new(|| {
|
||||
//! let cors = Cors::default()
|
||||
//! .allowed_origin("https://www.rust-lang.org")
|
||||
//! .allowed_origin_fn(|origin, _req_head| {
|
||||
//! origin.as_bytes().ends_with(b".rust-lang.org")
|
||||
//! })
|
||||
//! .allowed_methods(vec!["GET", "POST"])
|
||||
//! .allowed_headers(vec![http::header::AUTHORIZATION, http::header::ACCEPT])
|
||||
//! .allowed_header(http::header::CONTENT_TYPE)
|
||||
//! .max_age(3600);
|
||||
//! .allowed_origin("https://www.rust-lang.org")
|
||||
//! .allowed_origin_fn(|origin, _req_head| {
|
||||
//! origin.as_bytes().ends_with(b".rust-lang.org")
|
||||
//! })
|
||||
//! .allowed_methods(vec!["GET", "POST"])
|
||||
//! .allowed_headers(vec![http::header::AUTHORIZATION, http::header::ACCEPT])
|
||||
//! .allowed_header(http::header::CONTENT_TYPE)
|
||||
//! .max_age(3600);
|
||||
//!
|
||||
//! App::new()
|
||||
//! .wrap(cors)
|
||||
|
Reference in New Issue
Block a user