Updated the default value of `CorsRule.ExposedHeaders`, `CorsRule.AllowedHeaders` to empty and `CorsRule.MaxAgeInSeconds` to `0` for `setServiceProperties` APIs of all services.
This commit is contained in:
Родитель
0ef33028d7
Коммит
6ff1539a3d
|
@ -7,6 +7,7 @@ ALL
|
|||
|
||||
* Fixed the issue that retry filter will fail against storage emulator.
|
||||
* Fixed a hang issue of `StorageServiceClient` with retry policy filter set when retrying sending the request, the stream is not readable anymore.
|
||||
* Updated the default value of `CorsRule.ExposedHeaders`, `CorsRule.AllowedHeaders` to empty and `CorsRule.MaxAgeInSeconds` to `0` for `setServiceProperties` APIs of all services.
|
||||
|
||||
BLOB
|
||||
* Added the API `BlobService.getPageRangesDiff` for getting the page ranges difference. Refer to https://msdn.microsoft.com/en-us/library/azure/mt736912.aspx for more detailed information.
|
||||
|
|
|
@ -156,18 +156,30 @@ function serializeCorsRules(doc, rules){
|
|||
doc = doc.ele(ServicePropertiesConstants.ALLOWED_HEADERS_ELEMENT)
|
||||
.txt(rule.AllowedHeaders.join(','))
|
||||
.up();
|
||||
} else {
|
||||
doc = doc.ele(ServicePropertiesConstants.ALLOWED_HEADERS_ELEMENT)
|
||||
.txt('')
|
||||
.up();
|
||||
}
|
||||
|
||||
if(typeof rule.ExposedHeaders !== 'undefined' && _.isArray(rule.ExposedHeaders)){
|
||||
doc = doc.ele(ServicePropertiesConstants.EXPOSED_HEADERS_ELEMENT)
|
||||
.txt(rule.ExposedHeaders.join(','))
|
||||
.up();
|
||||
} else {
|
||||
doc = doc.ele(ServicePropertiesConstants.EXPOSED_HEADERS_ELEMENT)
|
||||
.txt('')
|
||||
.up();
|
||||
}
|
||||
|
||||
if(typeof rule.MaxAgeInSeconds !== 'undefined'){
|
||||
doc = doc.ele(ServicePropertiesConstants.MAX_AGE_IN_SECONDS_ELEMENT)
|
||||
.txt(rule.MaxAgeInSeconds)
|
||||
.up();
|
||||
} else {
|
||||
doc = doc.ele(ServicePropertiesConstants.MAX_AGE_IN_SECONDS_ELEMENT)
|
||||
.txt('0')
|
||||
.up();
|
||||
}
|
||||
|
||||
doc = doc.up();
|
||||
|
|
Загрузка…
Ссылка в новой задаче