diff --git a/actix_cors/enum.CorsError.html b/actix_cors/enum.CorsError.html index 3132f8611..43ff7751f 100644 --- a/actix_cors/enum.CorsError.html +++ b/actix_cors/enum.CorsError.html @@ -17,7 +17,7 @@ pub enum CorsError {
§

OriginNotAllowed

Origin is not allowed to make this request.

§

MethodNotAllowed

Request method is not allowed.

§

HeadersNotAllowed

One or more request headers are not allowed.

-

Trait Implementations§

source§

impl Clone for CorsError

source§

fn clone(&self) -> CorsError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CorsError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CorsError

source§

fn fmt(&self, _derive_more_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CorsError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl ResponseError for CorsError

source§

fn status_code(&self) -> StatusCode

Returns appropriate status code for error. Read more
source§

fn error_response(&self) -> HttpResponse

Creates full response for error. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for CorsError

§

impl Send for CorsError

§

impl Sync for CorsError

§

impl Unpin for CorsError

§

impl UnwindSafe for CorsError

Blanket Implementations§

source§

impl<T> Any for Twhere +

Trait Implementations§

source§

impl Clone for CorsError

source§

fn clone(&self) -> CorsError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CorsError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CorsError

source§

fn fmt(&self, _derive_more_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CorsError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl ResponseError for CorsError

source§

fn status_code(&self) -> StatusCode

Returns appropriate status code for error. Read more
source§

fn error_response(&self) -> HttpResponse

Creates full response for error. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for CorsError

§

impl Send for CorsError

§

impl Sync for CorsError

§

impl Unpin for CorsError

§

impl UnwindSafe for CorsError

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/actix_cors/index.html b/actix_cors/index.html index 94b2e4926..b43969286 100644 --- a/actix_cors/index.html +++ b/actix_cors/index.html @@ -5,8 +5,8 @@ builder can be used as an argument for Actix Web’s App::wrap(), <

This CORS middleware automatically handles OPTIONS preflight requests.

Crate Features

    -
  • draft-local-network-access: ⚠️ Unstable. Adds opt-in support for the Local Network Access -spec extensions. This feature is unstable since it will follow any breaking changes in the +
  • draft-private-network-access: ⚠️ Unstable. Adds opt-in support for the Private Network +Access spec extensions. This feature is unstable since it will follow breaking changes in the draft spec until it is finalized.

Example

diff --git a/actix_cors/struct.Cors.html b/actix_cors/struct.Cors.html index 2e4203811..41e0ee5b4 100644 --- a/actix_cors/struct.Cors.html +++ b/actix_cors/struct.Cors.html @@ -1,4 +1,4 @@ -Cors in actix_cors - Rust

Struct actix_cors::Cors

source ·
pub struct Cors { /* private fields */ }
Expand description

Builder for CORS middleware.

+Cors in actix_cors - Rust

Struct actix_cors::Cors

source ·
pub struct Cors { /* private fields */ }
Expand description

Builder for CORS middleware.

To construct a CORS middleware, call Cors::default() to create a blank, restrictive builder. Then use any of the builder methods to customize CORS behavior.

The alternative Cors::permissive() constructor is available for local development, allowing @@ -103,10 +103,10 @@ the Fetch Standard C

Defaults to false.

A server initialization error will occur if credentials are allowed, but the Origin is set to send wildcards (*); this is not allowed by the CORS protocol.

-
source

pub fn allow_local_network_access(self) -> Cors

Allow private network access.

-

If true, injects the Access-Control-Allow-Local-Network: true header in responses if the -request contained the Access-Control-Request-Local-Network: true header.

-

For more information on this behavior, see the draft [Local Network Access] spec.

+
source

pub fn allow_private_network_access(self) -> Cors

Allow private network access.

+

If true, injects the Access-Control-Allow-Private-Network: true header in responses if the +request contained the Access-Control-Request-Private-Network: true header.

+

For more information on this behavior, see the draft Private Network Access spec.

Defaults to false.

source

pub fn disable_vary_header(self) -> Cors

Disable Vary header support.

When enabled the header Vary: Origin will be returned as per the Fetch Standard diff --git a/help.html b/help.html index 99e84e117..178f910ad 100644 --- a/help.html +++ b/help.html @@ -1 +1 @@ -Rustdoc help

Rustdoc help

Back
\ No newline at end of file +Rustdoc help

Rustdoc help

Back
\ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index b4c5900d1..6852c7d99 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,5 +1,5 @@ (function() {var implementors = { -"actix_cors":[["impl Debug for Cors"],["impl Debug for CorsError"]], +"actix_cors":[["impl Debug for CorsError"],["impl Debug for Cors"]], "actix_identity":[["impl Debug for LostIdentityError"],["impl Debug for LogoutBehaviour"],["impl Debug for MissingIdentityError"],["impl Debug for SessionExpiryError"],["impl Debug for LoginError"],["impl Debug for GetIdentityError"],["impl Debug for IdentityMiddlewareBuilder"]], "actix_limitation":[["impl Debug for RateLimiter"],["impl Debug for Error"],["impl Debug for Builder"],["impl Debug for Limiter"],["impl Debug for Status"]], "actix_protobuf":[["impl Debug for ProtoBufPayloadError"],["impl<T> Debug for ProtoBuf<T>where\n T: Debug + Message,"]], diff --git a/search-index.js b/search-index.js index 04a5c75ff..bdac9e227 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"actix_cors":{"doc":"Cross-Origin Resource Sharing (CORS) controls for Actix …","t":"NNDENNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["BadRequestHeaders","BadRequestMethod","Cors","CorsError","HeadersNotAllowed","MethodNotAllowed","MissingOrigin","MissingRequestMethod","OriginNotAllowed","WildcardOrigin","allow_any_header","allow_any_method","allow_any_origin","allow_local_network_access","allowed_header","allowed_headers","allowed_methods","allowed_origin","allowed_origin_fn","block_on_origin_mismatch","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","default","disable_preflight","disable_vary_header","error_response","expose_any_header","expose_headers","fmt","fmt","fmt","from","from","into","into","max_age","new_transform","permissive","provide","send_wildcard","status_code","supports_credentials","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip"],"q":[[0,"actix_cors"]],"d":["Request header Access-Control-Request-Headers has an …","Request header Access-Control-Request-Method has an …","Builder for CORS middleware.","Errors that can occur when processing CORS guarded …","One or more request headers are not allowed.","Request method is not allowed.","Request header Origin is required but was not provided.","Request header Access-Control-Request-Method is required …","Origin is not allowed to make this request.","Allowed origin argument must not be wildcard (*).","Resets allowed request header list to a state where any …","Resets allowed methods list to all methods.","Resets allowed origin list to a state where any origin is …","Allow private network access.","Add an allowed request header.","Set a list of request header field names which can be used …","Set a list of methods which allowed origins can perform.","Add an origin that is allowed to make requests.","Determinate allowed origins by processing requests which …","Configures whether requests should be pre-emptively …","","","","","","","A restrictive (security paranoid) set of defaults.","Disable support for preflight requests.","Disable Vary header support.","","Resets exposed response header list to a state where all …","Set a list of headers which are safe to expose to the API …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Set a maximum time (in seconds) for which this CORS …","","A very permissive set of default for quick development. …","","Set to use wildcard origins.","","Allows users to make authenticated requests","","","","","","","","","",""],"i":[8,8,0,0,8,8,8,8,8,8,1,1,1,1,1,1,1,1,1,1,1,8,1,8,8,8,1,1,1,8,1,1,1,8,8,1,8,1,8,1,1,1,8,1,8,1,8,8,1,8,1,8,1,8,1,8],"f":[0,0,0,0,0,0,0,0,0,0,[1,1],[1,1],[1,1],[1,1],[[1,[3,[2]]],1],[[1,4],1],[[1,4],1],[[1,5],1],[[1,6],1],[[1,7],1],[[]],[[]],[[]],[[]],[8,8],[[]],[[],1],[1,1],[1,1],[8,9],[1,1],[[1,4],1],[[1,10],11],[[8,10],11],[[8,10],11],[[]],[[]],[[]],[[]],[[1,[14,[[13,[12]]]]],1],[[1,[16,[15]]]],[[],1],[17],[1,1],[8,18],[1,1],[[]],[[],19],[[],20],[[],20],[[],20],[[],20],[[],21],[[],21],[[]],[[]]],"c":[],"p":[[3,"Cors"],[3,"HeaderName"],[8,"TryInto"],[8,"IntoIterator"],[15,"str"],[8,"Fn"],[15,"bool"],[4,"CorsError"],[3,"HttpResponse"],[3,"Formatter"],[6,"Result"],[15,"usize"],[4,"Option"],[8,"Into"],[3,"ServiceRequest"],[8,"Service"],[3,"Demand"],[3,"StatusCode"],[3,"String"],[4,"Result"],[3,"TypeId"]]},\ +"actix_cors":{"doc":"Cross-Origin Resource Sharing (CORS) controls for Actix …","t":"NNDENNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["BadRequestHeaders","BadRequestMethod","Cors","CorsError","HeadersNotAllowed","MethodNotAllowed","MissingOrigin","MissingRequestMethod","OriginNotAllowed","WildcardOrigin","allow_any_header","allow_any_method","allow_any_origin","allow_private_network_access","allowed_header","allowed_headers","allowed_methods","allowed_origin","allowed_origin_fn","block_on_origin_mismatch","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","default","disable_preflight","disable_vary_header","error_response","expose_any_header","expose_headers","fmt","fmt","fmt","from","from","into","into","max_age","new_transform","permissive","provide","send_wildcard","status_code","supports_credentials","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip"],"q":[[0,"actix_cors"]],"d":["Request header Access-Control-Request-Headers has an …","Request header Access-Control-Request-Method has an …","Builder for CORS middleware.","Errors that can occur when processing CORS guarded …","One or more request headers are not allowed.","Request method is not allowed.","Request header Origin is required but was not provided.","Request header Access-Control-Request-Method is required …","Origin is not allowed to make this request.","Allowed origin argument must not be wildcard (*).","Resets allowed request header list to a state where any …","Resets allowed methods list to all methods.","Resets allowed origin list to a state where any origin is …","Allow private network access.","Add an allowed request header.","Set a list of request header field names which can be used …","Set a list of methods which allowed origins can perform.","Add an origin that is allowed to make requests.","Determinate allowed origins by processing requests which …","Configures whether requests should be pre-emptively …","","","","","","","A restrictive (security paranoid) set of defaults.","Disable support for preflight requests.","Disable Vary header support.","","Resets exposed response header list to a state where all …","Set a list of headers which are safe to expose to the API …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Set a maximum time (in seconds) for which this CORS …","","A very permissive set of default for quick development. …","","Set to use wildcard origins.","","Allows users to make authenticated requests","","","","","","","","","",""],"i":[8,8,0,0,8,8,8,8,8,8,1,1,1,1,1,1,1,1,1,1,1,8,1,8,8,8,1,1,1,8,1,1,1,8,8,1,8,1,8,1,1,1,8,1,8,1,8,8,1,8,1,8,1,8,1,8],"f":[0,0,0,0,0,0,0,0,0,0,[1,1],[1,1],[1,1],[1,1],[[1,[3,[2]]],1],[[1,4],1],[[1,4],1],[[1,5],1],[[1,6],1],[[1,7],1],[[]],[[]],[[]],[[]],[8,8],[[]],[[],1],[1,1],[1,1],[8,9],[1,1],[[1,4],1],[[1,10],11],[[8,10],11],[[8,10],11],[[]],[[]],[[]],[[]],[[1,[14,[[13,[12]]]]],1],[[1,[16,[15]]]],[[],1],[17],[1,1],[8,18],[1,1],[[]],[[],19],[[],20],[[],20],[[],20],[[],20],[[],21],[[],21],[[]],[[]]],"c":[],"p":[[3,"Cors"],[3,"HeaderName"],[8,"TryInto"],[8,"IntoIterator"],[15,"str"],[8,"Fn"],[15,"bool"],[4,"CorsError"],[3,"HttpResponse"],[3,"Formatter"],[6,"Result"],[15,"usize"],[4,"Option"],[8,"Into"],[3,"ServiceRequest"],[8,"Service"],[3,"Demand"],[3,"StatusCode"],[3,"String"],[4,"Result"],[3,"TypeId"]]},\ "actix_identity":{"doc":"Identity management for Actix Web.","t":"DIDLLLLLLLALALLLKLLLLLLLLLLLLLLLNDENLLLLLLLLLLLLLLLLLLLLLLLLLLLLEDDNDNDNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Identity","IdentityExt","IdentityMiddleware","borrow","borrow","borrow_mut","borrow_mut","builder","clone","clone_into","config","default","error","from","from","from_request","get_identity","id","into","into","login","logout","new_transform","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","DeleteIdentityKeys","IdentityMiddlewareBuilder","LogoutBehaviour","PurgeSession","borrow","borrow","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","fmt","fmt","from","from","into","into","login_deadline","logout_behaviour","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","visit_deadline","vzip","vzip","GetIdentityError","LoginError","LostIdentityError","LostIdentityError","MissingIdentityError","MissingIdentityError","SessionExpiryError","SessionExpiryError","SessionGetError","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","into","into","into","into","into","provide","provide","provide","provide","provide","source","source","status_code","status_code","to_string","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":[[0,"actix_identity"],[32,"actix_identity::config"],[64,"actix_identity::error"]],"d":["A verified user identity. It can be used as a request …","Helper trait to retrieve an Identity instance from various …","Identity management middleware.","","","","","A fluent API to configure IdentityMiddleware.","","","Configuration options to tune the behaviour of …","","Failure modes of identity operations.","Returns the argument unchanged.","Returns the argument unchanged.","","Retrieve the identity attached to the current session, if …","Return the user id associated to the current session.","Calls U::from(self).","Calls U::from(self).","Attach a valid user identity to the current session.","Remove the user identity from the current session.","","","","","","","","","","","When Identity::logout is called, remove the identity …","A fluent builder to construct an IdentityMiddleware …","LogoutBehaviour controls what actions are going to be …","When Identity::logout is called, purge the current session.","","","","","Finalises the builder and returns an IdentityMiddleware …","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Automatically logs out users after a certain amount of …","Determines how Identity::logout affects the current …","","","","","","","","","Automatically logs out users after a certain amount of …","","","Errors that can occur while retrieving an identity.","Error that can occur during login attempts.","The identity information has been lost.","Identity info was lost after being validated.","There is no identity information attached to the current …","No identity is found in a session.","Error encountered when working with a session that has …","The session has expired.","Failed to accessing the session store.","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,5,2,5,2,2,2,2,0,2,0,5,2,5,27,5,5,2,5,5,2,2,5,2,5,2,5,2,5,2,14,0,0,14,14,1,14,1,1,14,1,14,1,14,1,14,1,14,1,1,1,14,1,14,1,14,1,14,1,1,14,1,0,0,0,6,0,6,0,6,6,10,19,20,21,6,10,19,20,21,6,10,10,19,19,20,20,21,21,6,6,10,10,19,20,21,6,6,6,6,6,10,19,20,21,6,10,19,20,21,6,10,6,10,6,10,19,20,21,6,10,19,20,21,6,10,19,20,21,6,10,19,20,21,6,10,19,20,21,6],"f":[0,0,0,[[]],[[]],[[]],[[]],[[],1],[2,2],[[]],0,[[],2],0,[[]],[[]],[[3,4]],[[],[[7,[5,6]]]],[5,[[7,[8,6]]]],[[]],[[]],[[9,8],[[7,[5,10]]]],[5],[[2,[12,[11]]]],[[]],[[],7],[[],7],[[],7],[[],7],[[],13],[[],13],[[]],[[]],0,0,0,0,[[]],[[]],[[]],[[]],[1,2],[14,14],[1,1],[[]],[[]],[[14,15],16],[[1,15],16],[[]],[[]],[[]],[[]],[[1,[18,[17]]],1],[[1,14],1],[[]],[[]],[[],7],[[],7],[[],7],[[],7],[[],13],[[],13],[[1,[18,[17]]],1],[[]],[[]],0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[10,15],16],[[10,15],16],[[19,15],16],[[19,15],16],[[20,15],16],[[20,15],16],[[21,15],16],[[21,15],16],[[6,15],16],[[6,15],16],[[]],[22,10],[[]],[[]],[[]],[21,6],[23,6],[19,6],[20,6],[[]],[[]],[[]],[[]],[[]],[[]],[24],[24],[24],[24],[24],[10,[[18,[25]]]],[6,[[18,[25]]]],[10,26],[6,26],[[],8],[[],8],[[],8],[[],8],[[],8],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],13],[[],13],[[],13],[[],13],[[],13],[[]],[[]],[[]],[[]],[[]]],"c":[],"p":[[3,"IdentityMiddlewareBuilder"],[3,"IdentityMiddleware"],[3,"HttpRequest"],[4,"Payload"],[3,"Identity"],[4,"GetIdentityError"],[4,"Result"],[3,"String"],[3,"Extensions"],[3,"LoginError"],[3,"ServiceRequest"],[8,"Service"],[3,"TypeId"],[4,"LogoutBehaviour"],[3,"Formatter"],[6,"Result"],[3,"Duration"],[4,"Option"],[3,"SessionExpiryError"],[3,"LostIdentityError"],[3,"MissingIdentityError"],[3,"SessionInsertError"],[3,"SessionGetError"],[3,"Demand"],[8,"Error"],[3,"StatusCode"],[8,"IdentityExt"]]},\ "actix_limitation":{"doc":"Rate limiter using a fixed window counter for arbitrary …","t":"DNRRRRENDNDDNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Builder","Client","DEFAULT_COOKIE_NAME","DEFAULT_PERIOD_SECS","DEFAULT_REQUEST_LIMIT","DEFAULT_SESSION_KEY","Error","LimitExceeded","Limiter","Other","RateLimiter","Status","Time","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","builder","clone","clone","clone_into","clone_into","cookie_name","count","default","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","into","into","into","into","into","key_by","limit","limit","new_transform","period","provide","remaining","reset_epoch_utc","session_key","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip"],"q":[[0,"actix_limitation"]],"d":["Rate limiter builder.","Redis client failed to connect or run a query.","Default cookie name.","Default period (in seconds).","Default request limit.","Default session key.","Failure modes of the rate limiter.","Limit is exceeded for a key.","Rate limiter.","Generic error.","Rate limit middleware.","A report for a given key containing the limit status.","Time conversion failed.","","","","","","","","","","","Finalizes and returns a Limiter.","Construct rate limiter builder with defaults.","","","","","Sets name of cookie to be sent.","Consumes one rate limit unit, returning the status.","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Sets rate limit key derivation function.","Set upper limit.","Returns the maximum number of requests allowed in the …","","Set limit window/period.","","Returns how many requests are left in the current period.","Returns a UNIX timestamp in UTC approximately when the …","Sets session key to be used in backend.","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,3,0,0,0,0,0,3,0,3,0,0,3,1,3,10,7,2,1,3,10,7,2,1,2,7,2,7,2,1,2,10,1,3,3,10,7,2,1,3,3,3,10,7,2,1,3,10,7,2,1,1,7,10,1,3,7,7,1,3,7,2,3,1,3,10,7,2,1,3,10,7,2,1,3,10,7,2,1,3,10,7,2],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,[[4,[2,3]]]],[[[6,[5]]],1],[7,7],[2,2],[[]],[[]],[[1,[6,[[9,[8]]]]],1],[[2,[6,[5]]],[[4,[7,3]]]],[[],10],[[1,11],12],[[3,11],12],[[3,11],12],[[10,11],12],[[7,11],12],[[2,11],12],[[]],[13,3],[[]],[14,3],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[1,[0,[15,16,17]]],1],[[1,18],1],[7,18],[[10,[20,[19]]]],[[1,21],1],[22],[7,18],[7,18],[[1,[6,[[9,[8]]]]],1],[3,[[24,[23]]]],[[]],[[]],[[],5],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],25],[[],25],[[],25],[[],25],[[],25],[[]],[[]],[[]],[[]],[[]]],"c":[29,58],"p":[[3,"Builder"],[3,"Limiter"],[4,"Error"],[4,"Result"],[3,"String"],[8,"Into"],[3,"Status"],[15,"str"],[4,"Cow"],[3,"RateLimiter"],[3,"Formatter"],[6,"Result"],[3,"ComponentRange"],[3,"RedisError"],[8,"Fn"],[8,"Send"],[8,"Sync"],[15,"usize"],[3,"ServiceRequest"],[8,"Service"],[3,"Duration"],[3,"Demand"],[8,"Error"],[4,"Option"],[3,"TypeId"]]},\ "actix_protobuf":{"doc":"Protobuf payload extractor for Actix Web.","t":"NNNNDDDEINLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLL","n":["ContentType","Deserialize","Overflow","Payload","ProtoBuf","ProtoBufConfig","ProtoBufMessage","ProtoBufPayloadError","ProtoBufResponseBuilder","Serialize","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","deref","deref_mut","error_response","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from_request","into","into","into","into","into_future","limit","limit","new","poll","protobuf","resource_path","respond_to","to_string","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_poll","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip"],"q":[[0,"actix_protobuf"]],"d":["Content type error","Deserialize error","Payload size is bigger than 256k","Payload error","","","","","","Serialize error","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Change max size of payload. By default max size is 256Kb","Change max size of payload. By default max size is 256Kb","Create ProtoBufMessage for request.","","","","","","","","","","","","","","","","","","","","","","",""],"i":[4,4,4,4,0,0,0,0,0,4,3,1,16,4,3,1,16,4,1,3,3,4,3,3,4,4,3,1,16,4,4,4,3,3,1,16,4,16,1,16,16,16,25,3,3,3,4,3,1,16,4,3,1,16,4,16,3,1,16,4,3,1,16,4],"f":[0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],1],[[[3,[2]]],2],[[[3,[2]]],2],[4,5],[[[3,[[0,[6,2]]]],7],8],[[[3,[[0,[9,2]]]],7],8],[[4,7],8],[[4,7],8],[[]],[[]],[[]],[10,4],[11,4],[[]],[[12,13]],[[]],[[]],[[]],[[]],[[]],[[1,14],1],[[[16,[[0,[2,15]]]],14],[[16,[[0,[2,15]]]]]],[[12,13],[[16,[[0,[2,15]]]]]],[[[17,[[16,[[0,[2,15]]]]]],18],19],[2,[[21,[5,20]]]],[[],22],[[[3,[[0,[2,15]]]],12],5],[[],23],[[],23],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[],21],[[17,18],19],[[],24],[[],24],[[],24],[[],24],[[]],[[]],[[]],[[]]],"c":[],"p":[[3,"ProtoBufConfig"],[8,"Message"],[3,"ProtoBuf"],[4,"ProtoBufPayloadError"],[3,"HttpResponse"],[8,"Debug"],[3,"Formatter"],[6,"Result"],[8,"Display"],[3,"DecodeError"],[4,"PayloadError"],[3,"HttpRequest"],[4,"Payload"],[15,"usize"],[8,"Default"],[3,"ProtoBufMessage"],[3,"Pin"],[3,"Context"],[4,"Poll"],[3,"Error"],[4,"Result"],[3,"Path"],[3,"String"],[3,"TypeId"],[8,"ProtoBufResponseBuilder"]]},\ diff --git a/settings.html b/settings.html index 63646771b..9da1ec2f7 100644 --- a/settings.html +++ b/settings.html @@ -1 +1 @@ -Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file +Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src/actix_cors/builder.rs.html b/src/actix_cors/builder.rs.html index 874fb899b..e6a5a657b 100644 --- a/src/actix_cors/builder.rs.html +++ b/src/actix_cors/builder.rs.html @@ -785,8 +785,8 @@ preflight: true, send_wildcard: false, supports_credentials: true, - #[cfg(feature = "draft-local-network-access")] - allow_local_network_access: false, + #[cfg(feature = "draft-private-network-access")] + allow_private_network_access: false, vary_header: true, block_on_origin_mismatch: true, }; @@ -1106,18 +1106,18 @@ /// Allow private network access. /// - /// If true, injects the `Access-Control-Allow-Local-Network: true` header in responses if the - /// request contained the `Access-Control-Request-Local-Network: true` header. + /// If true, injects the `Access-Control-Allow-Private-Network: true` header in responses if the + /// request contained the `Access-Control-Request-Private-Network: true` header. /// - /// For more information on this behavior, see the draft [Local Network Access] spec. + /// For more information on this behavior, see the draft [Private Network Access] spec. /// /// Defaults to `false`. /// - /// [Private Network Access]: https://wicg.github.io/local-network-access - #[cfg(feature = "draft-local-network-access")] - pub fn allow_local_network_access(mut self) -> Cors { + /// [Private Network Access]: https://wicg.github.io/private-network-access + #[cfg(feature = "draft-private-network-access")] + pub fn allow_private_network_access(mut self) -> Cors { if let Some(cors) = cors(&mut self.inner, &self.error) { - cors.allow_local_network_access = true; + cors.allow_private_network_access = true; } self @@ -1197,8 +1197,8 @@ preflight: true, send_wildcard: false, supports_credentials: false, - #[cfg(feature = "draft-local-network-access")] - allow_local_network_access: false, + #[cfg(feature = "draft-private-network-access")] + allow_private_network_access: false, vary_header: true, block_on_origin_mismatch: true, }; diff --git a/src/actix_cors/inner.rs.html b/src/actix_cors/inner.rs.html index bcafe2a6c..4a7087c97 100644 --- a/src/actix_cors/inner.rs.html +++ b/src/actix_cors/inner.rs.html @@ -471,8 +471,8 @@ pub(crate) preflight: bool, pub(crate) send_wildcard: bool, pub(crate) supports_credentials: bool, - #[cfg(feature = "draft-local-network-access")] - pub(crate) allow_local_network_access: bool, + #[cfg(feature = "draft-private-network-access")] + pub(crate) allow_private_network_access: bool, pub(crate) vary_header: bool, pub(crate) block_on_origin_mismatch: bool, } @@ -629,19 +629,19 @@ val.extend(hdr.as_bytes()); val.extend(b", Origin, Access-Control-Request-Method, Access-Control-Request-Headers"); - #[cfg(feature = "draft-local-network-access")] - val.extend(b", Access-Control-Allow-Local-Network"); + #[cfg(feature = "draft-private-network-access")] + val.extend(b", Access-Control-Allow-Private-Network"); val.try_into().unwrap() } - #[cfg(feature = "draft-local-network-access")] + #[cfg(feature = "draft-private-network-access")] None => HeaderValue::from_static( "Origin, Access-Control-Request-Method, Access-Control-Request-Headers, \ - Access-Control-Allow-Local-Network", + Access-Control-Allow-Private-Network", ), - #[cfg(not(feature = "draft-local-network-access"))] + #[cfg(not(feature = "draft-private-network-access"))] None => HeaderValue::from_static( "Origin, Access-Control-Request-Method, Access-Control-Request-Headers", ), diff --git a/src/actix_cors/lib.rs.html b/src/actix_cors/lib.rs.html index f737ff51c..5fc548356 100644 --- a/src/actix_cors/lib.rs.html +++ b/src/actix_cors/lib.rs.html @@ -75,8 +75,8 @@ //! This CORS middleware automatically handles `OPTIONS` preflight requests. //! //! # Crate Features -//! - `draft-local-network-access`: ⚠️ Unstable. Adds opt-in support for the [Local Network Access] -//! spec extensions. This feature is unstable since it will follow any breaking changes in the +//! - `draft-private-network-access`: ⚠️ Unstable. Adds opt-in support for the [Private Network +//! Access] spec extensions. This feature is unstable since it will follow breaking changes in the //! draft spec until it is finalized. //! //! # Example @@ -114,7 +114,7 @@ //! } //! ``` //! -//! [Local Network Access]: https://wicg.github.io/local-network-access +//! [Private Network Access]: https://wicg.github.io/private-network-access #![forbid(unsafe_code)] #![deny(rust_2018_idioms, nonstandard_style)] diff --git a/src/actix_cors/middleware.rs.html b/src/actix_cors/middleware.rs.html index be8941d5b..ca46acdef 100644 --- a/src/actix_cors/middleware.rs.html +++ b/src/actix_cors/middleware.rs.html @@ -393,14 +393,14 @@ res.insert_header((header::ACCESS_CONTROL_ALLOW_HEADERS, headers.clone())); } - #[cfg(feature = "draft-local-network-access")] - if inner.allow_local_network_access + #[cfg(feature = "draft-private-network-access")] + if inner.allow_private_network_access && req .headers() - .contains_key("access-control-request-local-network") + .contains_key("access-control-request-private-network") { res.insert_header(( - header::HeaderName::from_static("access-control-allow-local-network"), + header::HeaderName::from_static("access-control-allow-private-network"), HeaderValue::from_static("true"), )); } @@ -473,15 +473,15 @@ ); } - #[cfg(feature = "draft-local-network-access")] - if inner.allow_local_network_access + #[cfg(feature = "draft-private-network-access")] + if inner.allow_private_network_access && res .request() .headers() - .contains_key("access-control-request-local-network") + .contains_key("access-control-request-private-network") { res.headers_mut().insert( - header::HeaderName::from_static("access-control-allow-local-network"), + header::HeaderName::from_static("access-control-allow-private-network"), HeaderValue::from_static("true"), ); }