mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
CORS origin does not end with / (#291)
This commit is contained in:
parent
a2c5cbd637
commit
d28ab6eaa1
@ -20,7 +20,7 @@
|
|||||||
//! async fn main() -> std::io::Result<()> {
|
//! async fn main() -> std::io::Result<()> {
|
||||||
//! HttpServer::new(|| {
|
//! HttpServer::new(|| {
|
||||||
//! let cors = Cors::default()
|
//! let cors = Cors::default()
|
||||||
//! .allowed_origin("https://www.rust-lang.org/")
|
//! .allowed_origin("https://www.rust-lang.org")
|
||||||
//! .allowed_origin_fn(|origin, _req_head| {
|
//! .allowed_origin_fn(|origin, _req_head| {
|
||||||
//! origin.as_bytes().ends_with(b".rust-lang.org")
|
//! origin.as_bytes().ends_with(b".rust-lang.org")
|
||||||
//! })
|
//! })
|
||||||
|
Loading…
Reference in New Issue
Block a user