CorsSettings Class
- java.
lang. Object - com.
azure. resourcemanager. appservice. models. CorsSettings
- com.
Implements
public final class CorsSettings
implements JsonSerializable<CorsSettings>
Cross-Origin Resource Sharing (CORS) settings for the app.
Constructor Summary
Constructor | Description |
---|---|
CorsSettings() |
Creates an instance of Cors |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<String> |
allowedOrigins()
Get the allowed |
static
Cors |
fromJson(JsonReader jsonReader)
Reads an instance of Cors |
Boolean |
supportCredentials()
Get the support |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Cors |
withAllowedOrigins(List<String> allowedOrigins)
Set the allowed |
Cors |
withSupportCredentials(Boolean supportCredentials)
Set the support |
Methods inherited from java.lang.Object
Constructor Details
CorsSettings
public CorsSettings()
Creates an instance of CorsSettings class.
Method Details
allowedOrigins
public List
Get the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all.
Returns:
fromJson
public static CorsSettings fromJson(JsonReader jsonReader)
Reads an instance of CorsSettings from the JsonReader.
Parameters:
Returns:
Throws:
supportCredentials
public Boolean supportCredentials()
Get the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\#Requests\_with\_credentials for more details.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAllowedOrigins
public CorsSettings withAllowedOrigins(List
Set the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all.
Parameters:
Returns:
withSupportCredentials
public CorsSettings withSupportCredentials(Boolean supportCredentials)
Set the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\#Requests\_with\_credentials for more details.
Parameters:
Returns:
Applies to
Azure SDK for Java