Struct google_api_proto::google::cloud::networkservices::v1::http_route::CorsPolicy
source · pub struct CorsPolicy {
pub allow_origins: Vec<String>,
pub allow_origin_regexes: Vec<String>,
pub allow_methods: Vec<String>,
pub allow_headers: Vec<String>,
pub expose_headers: Vec<String>,
pub max_age: String,
pub allow_credentials: bool,
pub disabled: bool,
}
Expand description
The Specification for allowing client side cross-origin requests.
Fields§
§allow_origins: Vec<String>
Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.
allow_origin_regexes: Vec<String>
Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.
allow_methods: Vec<String>
Specifies the content for Access-Control-Allow-Methods header.
allow_headers: Vec<String>
Specifies the content for Access-Control-Allow-Headers header.
expose_headers: Vec<String>
Specifies the content for Access-Control-Expose-Headers header.
max_age: String
Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.
allow_credentials: bool
In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.
Default value is false.
disabled: bool
If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
Trait Implementations§
source§impl Clone for CorsPolicy
impl Clone for CorsPolicy
source§fn clone(&self) -> CorsPolicy
fn clone(&self) -> CorsPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CorsPolicy
impl Debug for CorsPolicy
source§impl Default for CorsPolicy
impl Default for CorsPolicy
source§impl Message for CorsPolicy
impl Message for CorsPolicy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq for CorsPolicy
impl PartialEq for CorsPolicy
source§fn eq(&self, other: &CorsPolicy) -> bool
fn eq(&self, other: &CorsPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CorsPolicy
Auto Trait Implementations§
impl Freeze for CorsPolicy
impl RefUnwindSafe for CorsPolicy
impl Send for CorsPolicy
impl Sync for CorsPolicy
impl Unpin for CorsPolicy
impl UnwindSafe for CorsPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request