XSS और XSRF रोकथाम
क्रॉस-साइट स्क्रिप्टिंग (XSS) से सुरक्षा के लिए, सभी रिस्पॉन्स के लिए एचटीटीपी हेडर X-Content-Type-Options: nosniff
ज़रूरी होता है. जवाब के हेडर में Content-Type: application/json; charset=utf-8
भी शामिल करें.
क्रॉस-साइट अनुरोध फ़र्जी (XSRF) से सुरक्षित होने के लिए, सभी अनुरोधों के लिए HTTP हेडर X-XSRF-Protected: 1
ज़रूरी है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]