CorsRule Class
- java.
lang. Object - com.
microsoft. azure. management. storage. CorsRule
- com.
public class CorsRule
Specifies a CORS rule for the Blob service.
Constructor Summary
Constructor | Description | |
---|---|---|
CorsRule() |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
allowedHeaders()
Get required if Cors |
java.util.List<java.lang.String> |
allowedMethods()
Get required if Cors |
java.util.List<java.lang.String> |
allowedOrigins()
Get required if Cors |
java.util.List<java.lang.String> |
exposedHeaders()
Get required if Cors |
int |
maxAgeInSeconds()
Get required if Cors |
Cors |
withAllowedHeaders(List<String> allowedHeaders)
Set required if Cors |
Cors |
withAllowedMethods(List<String> allowedMethods)
Set required if Cors |
Cors |
withAllowedOrigins(List<String> allowedOrigins)
Set required if Cors |
Cors |
withExposedHeaders(List<String> exposedHeaders)
Set required if Cors |
Cors |
withMaxAgeInSeconds(int maxAgeInSeconds)
Set required if Cors |
Methods inherited from java.lang.Object
Constructor Details
CorsRule
public CorsRule()
Method Details
allowedHeaders
public List
Get required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
Returns:
allowedMethods
public List
Get required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
Returns:
allowedOrigins
public List
Get required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
Returns:
exposedHeaders
public List
Get required if CorsRule element is present. A list of response headers to expose to CORS clients.
Returns:
maxAgeInSeconds
public int maxAgeInSeconds()
Get required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
Returns:
withAllowedHeaders
public CorsRule withAllowedHeaders(List
Set required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.
Parameters:
Returns:
withAllowedMethods
public CorsRule withAllowedMethods(List
Set required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.
Parameters:
Returns:
withAllowedOrigins
public CorsRule withAllowedOrigins(List
Set required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.
Parameters:
Returns:
withExposedHeaders
public CorsRule withExposedHeaders(List
Set required if CorsRule element is present. A list of response headers to expose to CORS clients.
Parameters:
Returns:
withMaxAgeInSeconds
public CorsRule withMaxAgeInSeconds(int maxAgeInSeconds)
Set required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for