קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
דפדפנים מודרניים מחילים הגבלות אבטחה ממקור זהה על רשת JavaScript
כלומר, אפליקציית אינטרנט שפועלת ממקור אחד לא יכולה לאחזר נתונים.
מוצגת ממקור אחר. ב-VAST, הגבלת האבטחה הזו מונעת
JavaScript XMLHttpRequests נוצר מקוד רינדור JavaScript VAST מקריאה
תגובת VAST שהוצגה ממקור אחר.
הגבלת האבטחה הזו נועדה למנוע בעיות שבהן מקור אחד יכול
כדי לקרוא נתונים ממקור אחר שיכול להיות שהמשתמש מחובר אליו בלי המידע הזה
משתמש. ההגבלה יוצרת בעיות בקובצי VAST שמוצגים ב-JavaScript.
מאחר ששרת מודעות נמצא בדרך כלל בדומיין שונה
נגן המודעות.
כותרות של שיתוף משאבים בין מקורות (CORS) הן מפרט טיוטה של W3C שנועד
כדי לאפשר שיתוף בין מקורות שונים. להיות ניתן להצגה ב-JavaScript
תגובת שרת מודעות VAST חייבת לכלול את כותרות HTTP CORS הבאות:
כותרת ה-HTTP הזו מאפשרת לנגן מודעות בכל מקור לקרוא את תגובת ה-VAST
מהמקור של שרת המודעות. הערך של Access-Control-Allow-Origin:
צריך להיות הערך של הכותרת Origin שנשלחה עם הבקשה להצגת מודעה.
הכותרת Access-Control-Allow-Credentials: מבטיחה
קובצי ה-Cookie נשלחים ומתקבלים כראוי.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-05-29 (שעון UTC)."],[[["Modern browsers restrict JavaScript from accessing data from different origins (websites) for security reasons, affecting VAST ad serving."],["This restriction prevents unauthorized data access between websites, but poses challenges for VAST ads as ad servers and players are often on different domains."],["Cross-Origin Resource Sharing (CORS) headers allow secure data sharing between origins by including specific HTTP headers in the ad server's response."],["VAST ad servers need to include `Access-Control-Allow-Origin` and `Access-Control-Allow-Credentials` headers to enable JavaScript-based ad serving."]]],["Web browsers restrict JavaScript network requests to the same origin, hindering JavaScript VAST rendering code from accessing VAST ad responses from different origins. To enable cross-origin access, VAST ad servers must include specific CORS headers in their responses. The `Access-Control-Allow-Origin` header should match the request's `Origin`, and `Access-Control-Allow-Credentials: true` allows for proper cookie handling. These headers enable ad players on any origin to read the VAST response, overcoming the same-origin security restriction.\n"]]