ฉันกำลังพยายามตั้งกฎ CORS ในบัญชี Azure Blob Storage ของฉันโดยปฏิบัติตาม คำแนะนำเหล่านี้.
นี่คือข้อผิดพลาดที่ฉันได้รับหลังจากส่งคำขอ:
400 ข้อมูลการรับรองความถูกต้องไม่ได้ระบุไว้ในรูปแบบที่ถูกต้อง ตรวจสอบค่าของส่วนหัวการอนุญาต
URL คำขอ:
PUT https://[MyAccountName].blob.core.windows.net/?restype=service&comp=properties
ส่วนหัวของคำขอ:
x-ms-version: 2013-08-15
x-ms-date: Tue, 25 Feb 2014 13:02:00 GMT
Authorization: SharedKey
[MyAccountName]: [MyAccountKey]
Content-Length: 329
Host: [MyAccountName].blob.core.windows.net
เนื้อหาคำขอ:
<?xml version="1.0" encoding="utf-8"?>
<StorageServiceProperties>
<Cors>
<CorsRule>
<AllowedOrigins>http://www.example.com</AllowedOrigins>
<AllowedMethods>GET</AllowedMethods>
<ExposedHeaders>x-ms-meta-data*,x-ms-meta*</ExposedHeaders>
<AllowedHeaders>x-ms-meta-target*,x-ms-meta*</AllowedHeaders>
<MaxAgeInSeconds>200</MaxAgeInSeconds>
</CorsRule>
<Cors>
</StorageServiceProperties>