CorsSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.CorsSettings

public final class CorsSettings

Cross-Origin Resource Sharing (CORS) settings for the app.

Constructor Summary

Constructor Description
CorsSettings()

Creates an instance of CorsSettings class.

Method Summary

Modifier and Type Method and Description
List<String> allowedOrigins()

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).

Boolean supportCredentials()

Get the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed.

void validate()

Validates the instance.

CorsSettings withAllowedOrigins(List<String> allowedOrigins)

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).

CorsSettings withSupportCredentials(Boolean supportCredentials)

Set the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed.

Methods inherited from java.lang.Object

Constructor Details

CorsSettings

public CorsSettings()

Creates an instance of CorsSettings class.

Method Details

allowedOrigins

public List allowedOrigins()

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:

the allowedOrigins value.

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:

the supportCredentials value.

validate

public void validate()

Validates the instance.

withAllowedOrigins

public CorsSettings withAllowedOrigins(List allowedOrigins)

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:

allowedOrigins - the allowedOrigins value to set.

Returns:

the CorsSettings object itself.

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:

supportCredentials - the supportCredentials value to set.

Returns:

the CorsSettings object itself.

Applies to