public final class CorsOptions extends Object
Constructor and Description |
---|
CorsOptions() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAllowedOrigins()
Get the allowedOrigins property: The list of origins from which
JavaScript code will be granted access to your index.
|
Long |
getMaxAgeInSeconds()
Get the maxAgeInSeconds property: The duration for which browsers should
cache CORS preflight responses.
|
CorsOptions |
setAllowedOrigins(String... allowedOrigins)
Set the allowedOrigins property: The list of origins from which
JavaScript code will be granted access to your index.
|
CorsOptions |
setMaxAgeInSeconds(Long maxAgeInSeconds)
Set the maxAgeInSeconds property: The duration for which browsers should
cache CORS preflight responses.
|
public List<String> getAllowedOrigins()
public CorsOptions setAllowedOrigins(String... allowedOrigins)
allowedOrigins
- the allowedOrigins value to set.public Long getMaxAgeInSeconds()
public CorsOptions setMaxAgeInSeconds(Long maxAgeInSeconds)
maxAgeInSeconds
- the maxAgeInSeconds value to set.Copyright © 2020 Microsoft Corporation. All rights reserved.