mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 15:51:06 +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<()> {
|
||||
//! HttpServer::new(|| {
|
||||
//! let cors = Cors::default()
|
||||
//! .allowed_origin("https://www.rust-lang.org/")
|
||||
//! .allowed_origin("https://www.rust-lang.org")
|
||||
//! .allowed_origin_fn(|origin, _req_head| {
|
||||
//! origin.as_bytes().ends_with(b".rust-lang.org")
|
||||
//! })
|
||||
|
Loading…
Reference in New Issue
Block a user