1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Azure Storage Blob service
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2026-02-06
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CorsRule : CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CorsRule {
/// The allowed origins.
#[serde(rename = "AllowedOrigins")]
pub allowed_origins: String,
/// The allowed methods.
#[serde(rename = "AllowedMethods")]
pub allowed_methods: String,
/// The allowed headers.
#[serde(rename = "AllowedHeaders")]
pub allowed_headers: String,
/// The exposed headers.
#[serde(rename = "ExposedHeaders")]
pub exposed_headers: String,
/// The maximum age in seconds.
#[serde(rename = "MaxAgeInSeconds")]
pub max_age_in_seconds: i32,
}
impl CorsRule {
/// CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain
pub fn new(
allowed_origins: String,
allowed_methods: String,
allowed_headers: String,
exposed_headers: String,
max_age_in_seconds: i32,
) -> CorsRule {
CorsRule {
allowed_origins,
allowed_methods,
allowed_headers,
exposed_headers,
max_age_in_seconds,
}
}
}