מניעת XSS ו-XSRF
כדי להגן מפני פרצת אבטחה XSS (cross-site scripting), נדרשת כותרת ה-HTTP X-Content-Type-Options: nosniff
עבור כל התגובות. יש לכלול גם את Content-Type: application/json; charset=utf-8
בכותרת התגובה.
כדי להגן מפני זיוף בקשות בין אתרים (XSRF), נדרשת כותרת HTTP X-XSRF-Protected: 1
לכל הבקשות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2022-09-26 (שעון UTC).
[null,null,["עדכון אחרון: 2022-09-26 (שעון UTC)."],[[["All responses must include the `X-Content-Type-Options: nosniff` and `Content-Type: application/json; charset=utf-8` headers to mitigate cross-site scripting (XSS) vulnerabilities."],["All requests must include the `X-XSRF-Protected: 1` header to defend against cross-site request forgery (XSRF) attacks."]]],["Responses should include `X-Content-Type-Options: nosniff` and `Content-Type: application/json; charset=utf-8` headers to prevent cross-site scripting (XSS). To prevent cross-site request forgery (XSRF), all requests must include the `X-XSRF-Protected: 1` header. These actions enhance security by ensuring content types are strictly interpreted and verifying the origin of requests, thus mitigating common web vulnerabilities.\n"]]