@@ -47,7 +47,7 @@ impl CorsMiddleware {
47
47
}
48
48
}
49
49
50
- /// Set allow_credentials and return new Cors
50
+ /// Set ` allow_credentials` and return new Cors
51
51
#[ must_use]
52
52
pub fn allow_credentials ( mut self , allow_credentials : bool ) -> Self {
53
53
self . allow_credentials = match allow_credentials. to_string ( ) . parse ( ) {
@@ -57,31 +57,31 @@ impl CorsMiddleware {
57
57
self
58
58
}
59
59
60
- /// Set allow_headers and return new Cors
60
+ /// Set ` allow_headers` and return new Cors
61
61
pub fn allow_headers < T : Into < HeaderValue > > ( mut self , headers : T ) -> Self {
62
62
self . allow_headers = headers. into ( ) ;
63
63
self
64
64
}
65
65
66
- /// Set max_age and return new Cors
66
+ /// Set ` max_age` and return new Cors
67
67
pub fn max_age < T : Into < HeaderValue > > ( mut self , max_age : T ) -> Self {
68
68
self . max_age = max_age. into ( ) ;
69
69
self
70
70
}
71
71
72
- /// Set allow_methods and return new Cors
72
+ /// Set ` allow_methods` and return new Cors
73
73
pub fn allow_methods < T : Into < HeaderValue > > ( mut self , methods : T ) -> Self {
74
74
self . allow_methods = methods. into ( ) ;
75
75
self
76
76
}
77
77
78
- /// Set allow_origin and return new Cors
78
+ /// Set ` allow_origin` and return new Cors
79
79
pub fn allow_origin < T : Into < Origin > > ( mut self , origin : T ) -> Self {
80
80
self . allow_origin = origin. into ( ) ;
81
81
self
82
82
}
83
83
84
- /// Set expose_headers and return new Cors
84
+ /// Set ` expose_headers` and return new Cors
85
85
pub fn expose_headers < T : Into < HeaderValue > > ( mut self , headers : T ) -> Self {
86
86
self . expose_headers = Some ( headers. into ( ) ) ;
87
87
self
@@ -123,7 +123,7 @@ impl CorsMiddleware {
123
123
response
124
124
}
125
125
126
- /// Look at origin of request and determine allow_origin
126
+ /// Look at origin of request and determine ` allow_origin`
127
127
fn response_origin ( & self , origin : & HeaderValue ) -> Option < HeaderValue > {
128
128
if !self . is_valid_origin ( origin) {
129
129
return None ;
@@ -199,7 +199,7 @@ impl Default for CorsMiddleware {
199
199
}
200
200
}
201
201
202
- /// allow_origin enum
202
+ /// ` allow_origin` enum
203
203
#[ derive( Clone , Debug , Hash , PartialEq ) ]
204
204
pub enum Origin {
205
205
/// Wildcard. Accept all origin requests
0 commit comments