Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Member Functions | List of all members
azure::storage::service_properties::cors_rule Class Reference

Class representing the service properties pertaining to CORS. More...

Public Member Functions

 cors_rule ()
 Initializes a new instance of the azure::storage::service_properties::cors_rule class. More...
 
const std::vector< utility::string_t > & allowed_origins () const
 Gets domain names allowed via CORS. More...
 
std::vector< utility::string_t > & allowed_origins ()
 Gets domain names allowed via CORS. More...
 
void set_allowed_origins (std::vector< utility::string_t > value)
 Sets domain names allowed via CORS. More...
 
const std::vector< utility::string_t > & exposed_headers () const
 Gets response headers that should be exposed to client via CORS. More...
 
std::vector< utility::string_t > & exposed_headers ()
 Gets response headers that should be exposed to client via CORS. More...
 
void set_exposed_headers (std::vector< utility::string_t > value)
 Sets response headers that should be exposed to client via CORS. More...
 
const std::vector< utility::string_t > & allowed_headers () const
 Gets headers allowed to be part of the CORS request. More...
 
std::vector< utility::string_t > & allowed_headers ()
 Gets headers allowed to be part of the CORS request. More...
 
void set_allowed_headers (std::vector< utility::string_t > value)
 Sets headers allowed to be part of the CORS request. More...
 
const std::vector< web::http::method > & allowed_methods () const
 Gets the HTTP methods permitted to execute for this origin. More...
 
std::vector< web::http::method > & allowed_methods ()
 Gets the HTTP methods permitted to execute for this origin. More...
 
void set_allowed_methods (std::vector< web::http::method > value)
 Sets the HTTP methods permitted to execute for this origin. More...
 
const std::chrono::seconds max_age () const
 Gets the length of time in seconds that a preflight response should be cached by browser. More...
 
void set_max_age (const std::chrono::seconds value)
 Sets the length of time in seconds that a preflight response should be cached by browser. More...
 

Detailed Description

Class representing the service properties pertaining to CORS.

Constructor & Destructor Documentation

◆ cors_rule()

azure::storage::service_properties::cors_rule::cors_rule ( )
inline

Initializes a new instance of the azure::storage::service_properties::cors_rule class.

Member Function Documentation

◆ allowed_headers() [1/2]

const std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::allowed_headers ( ) const
inline

Gets headers allowed to be part of the CORS request.

Returns
A collection of strings containing allowed headers, limited to 64 defined headers and two prefixed headers.

◆ allowed_headers() [2/2]

std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::allowed_headers ( )
inline

Gets headers allowed to be part of the CORS request.

Returns
A collection of strings containing allowed headers, limited to 64 defined headers and two prefixed headers.

◆ allowed_methods() [1/2]

const std::vector<web::http::method>& azure::storage::service_properties::cors_rule::allowed_methods ( ) const
inline

Gets the HTTP methods permitted to execute for this origin.

Returns
The allowed HTTP methods.

◆ allowed_methods() [2/2]

std::vector<web::http::method>& azure::storage::service_properties::cors_rule::allowed_methods ( )
inline

Gets the HTTP methods permitted to execute for this origin.

Returns
The allowed HTTP methods.

◆ allowed_origins() [1/2]

const std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::allowed_origins ( ) const
inline

Gets domain names allowed via CORS.

Returns
A collection of strings containing the allowed domain names, limited to 64.

◆ allowed_origins() [2/2]

std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::allowed_origins ( )
inline

Gets domain names allowed via CORS.

Returns
A collection of strings containing the allowed domain names, limited to 64.

◆ exposed_headers() [1/2]

const std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::exposed_headers ( ) const
inline

Gets response headers that should be exposed to client via CORS.

Returns
A collection of strings containing exposed headers, limited to 64 defined headers and two prefixed headers.

◆ exposed_headers() [2/2]

std::vector<utility::string_t>& azure::storage::service_properties::cors_rule::exposed_headers ( )
inline

Gets response headers that should be exposed to client via CORS.

Returns
A collection of strings containing exposed headers, limited to 64 defined headers and two prefixed headers.

◆ max_age()

const std::chrono::seconds azure::storage::service_properties::cors_rule::max_age ( ) const
inline

Gets the length of time in seconds that a preflight response should be cached by browser.

Returns
The maximum number of seconds to cache the response.

◆ set_allowed_headers()

void azure::storage::service_properties::cors_rule::set_allowed_headers ( std::vector< utility::string_t >  value)
inline

Sets headers allowed to be part of the CORS request.

Parameters
valueA collection of strings containing allowed headers, limited to 64 defined headers and two prefixed headers.

◆ set_allowed_methods()

void azure::storage::service_properties::cors_rule::set_allowed_methods ( std::vector< web::http::method >  value)
inline

Sets the HTTP methods permitted to execute for this origin.

Parameters
valueThe allowed HTTP methods.

◆ set_allowed_origins()

void azure::storage::service_properties::cors_rule::set_allowed_origins ( std::vector< utility::string_t >  value)
inline

Sets domain names allowed via CORS.

Parameters
valueA collection of strings containing the allowed domain names, limited to 64.

◆ set_exposed_headers()

void azure::storage::service_properties::cors_rule::set_exposed_headers ( std::vector< utility::string_t >  value)
inline

Sets response headers that should be exposed to client via CORS.

Parameters
valueA collection of strings containing exposed headers, limited to 64 defined headers and two prefixed headers.

◆ set_max_age()

void azure::storage::service_properties::cors_rule::set_max_age ( const std::chrono::seconds  value)
inline

Sets the length of time in seconds that a preflight response should be cached by browser.

Parameters
valueThe maximum number of seconds to cache the response.