mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 10:27:42 +02:00
Add block_on_origin_mismatch option to middleware (#287)
Co-authored-by: CapableWeb <capableweb@domain.com> Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@ -39,6 +39,8 @@ async fn main() -> std::io::Result<()> {
|
||||
.allowed_header(header::CONTENT_TYPE)
|
||||
// set list of headers that are safe to expose
|
||||
.expose_headers(&[header::CONTENT_DISPOSITION])
|
||||
// allow cURL/HTTPie from working without providing Origin headers
|
||||
.block_on_origin_mismatch(false)
|
||||
// set preflight cache TTL
|
||||
.max_age(3600),
|
||||
)
|
||||
|
Reference in New Issue
Block a user